[SERVER-41794] Remove excessive reporting of deprecation messages for sslMode Created: 17/Jun/19  Updated: 29/Oct/23  Resolved: 02/Jul/19

Status: Closed
Project: Core Server
Component/s: Admin, Security
Affects Version/s: None
Fix Version/s: 4.2.0-rc3, 4.3.1

Type: Task Priority: Major - P3
Reporter: Spencer Jackson Assignee: Jonathan Reams
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.2
Sprint: Security 2019-07-01, Security 2019-07-15
Participants:

 Description   

Repeated use of set/getParameter will log deprecation warnings multiple times. We should avoid this as much as possible, to avoid spamming the logs.



 Comments   
Comment by Githook User [ 08/Jul/19 ]

Author:

{'name': 'Jonathan Reams', 'email': 'jbreams@mongodb.com', 'username': 'jbreams'}

Message: SERVER-41794 Only log about sslMode being deprecated when it's set for the first time

(cherry picked from commit c41f406d66fbc18ee29eb6524483515f6f7c2b83)
Branch: v4.2
https://github.com/mongodb/mongo/commit/e0a673ab99d236ef1039170c06cfaa3f78995624

Comment by Githook User [ 02/Jul/19 ]

Author:

{'name': 'Jonathan Reams', 'username': 'jbreams', 'email': 'jbreams@mongodb.com'}

Message: SERVER-41794 Only log about sslMode being deprecated when it's set for the first time
Branch: master
https://github.com/mongodb/mongo/commit/c41f406d66fbc18ee29eb6524483515f6f7c2b83

Comment by Kevin Pulo [ 19/Jun/19 ]

In the past we've used RARELY log() to log every 128th occurrence (or OCCASIONALLY for every 16th). The new Occasionally/Rarely are better, but marginally clunkier to use. Probably better to just move this warning into a validator for the SSLModeServerParameter IDL type?

Comment by Andy Schwerin [ 17/Jun/19 ]

I believe there's a means of logging specific messages exactly once, now. Perhaps it's applicable?

Comment by Eric Milkie [ 17/Jun/19 ]

We should also fix the typo in the log message itself.

Generated at Thu Feb 08 04:58:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.