[SERVER-50418] Add exhaustHello to serverStatus Created: 20/Aug/20  Updated: 29/Oct/23  Resolved: 30/Sep/20

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 4.4.2

Type: Task Priority: Major - P3
Reporter: Pavithra Vetriselvan Assignee: Huayu Ouyang
Resolution: Fixed Votes: 0
Labels: bkp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Backport Requested:
v5.0, v4.4
Sprint: Repl 2020-09-21, Repl 2020-10-05
Participants:
Linked BF Score: 47

 Description   

Since we're maintaining separate counters for the ismaster and hello commands via commands.hello and commands.ismaster, we should maintain separate metrics to exhaust ismaster commands vs exhaust hello commands.



 Comments   
Comment by Githook User [ 08/Oct/20 ]

Author:

{'name': 'huayu-ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}

Message: SERVER-50418 Add exhaustHello to serverStatus

(cherry picked from commit f44ef61bcfe5a58fefd3617040fd1cbf0534594d)
Branch: v4.4
https://github.com/mongodb/mongo/commit/4a3557f4532014ed82b00d3ea0419e73d7fa80fd

Comment by Githook User [ 30/Sep/20 ]

Author:

{'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}

Message: SERVER-50418-2 Rename IsMasterMetrics to HelloMetrics and InExhaustIsMaster to InExhaustHello
Branch: master
https://github.com/mongodb/mongo/commit/f831517ed6ee7e0b866229d45d2149bf23dece60

Comment by Githook User [ 29/Sep/20 ]

Author:

{'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}

Message: SERVER-50418 wait for all exhaust streams to close before starting tests
Branch: master
https://github.com/mongodb/mongo/commit/5ecee573374e0131e3c3454392b2c51694a7f175

Comment by Githook User [ 24/Sep/20 ]

Author:

{'name': 'huayu-ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}

Message: SERVER-50418 Add exhaustHello to serverStatus
Branch: master
https://github.com/mongodb/mongo/commit/f44ef61bcfe5a58fefd3617040fd1cbf0534594d

Comment by Pavithra Vetriselvan [ 16/Sep/20 ]

huayu.ouyang That plan sounds good to me! While we're in this code path, we can also change IsMasterMetrics to HelloMetrics and InExhaustIsMaster to InExhaustHello. The renaming can be done in a separate commit on this ticket so that it is distinct from the functional changes.

Comment by Huayu Ouyang [ 16/Sep/20 ]

For this ticket, I'm planning on adding a field _exhaustHelloConnections and the corresponding getNumExhaustHello, incrementNumExhaustHello, and decrementNumExhaustHello functions in IsMaster_Metrics to track the number of connections whose last request was hello with exhaustAllowed. In InExhaustIsMaster::setInExhaustIsMaster, I will add a parameter to see whether the command called was hello or  isMaster, and if the command was hello, I will increment/decrement the number of _exhaustHelloConnections appropriately. I'll also update calls to setInExhaustIsMaster appropriately with information about which command was called and add exhaustHello as a stat in ServiceEntryPointImpl::appendStats

Comment by Bruce Lucas (Inactive) [ 20/Aug/20 ]

You're right, I think we only specifically discussed those two in the design, but I agree it does make sense to be consistent. Thanks.

Comment by Pavithra Vetriselvan [ 20/Aug/20 ]

bruce.lucas Ah, I see your point. I thought we just decided this for commands.hello and commands.ismaster, but I see now that if we're keeping the commands separate there, we should also have separate counters for exhaustIsMaster and exhaustHello.

Will update the ticket accordingly!

Comment by Bruce Lucas (Inactive) [ 20/Aug/20 ]

Shouldn't this be add exaustHello, i.e. I thought we were going to maintain separate counters for each alias?

Generated at Thu Feb 08 05:22:36 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.