[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: |
|
||||||||
| 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: (cherry picked from commit f44ef61bcfe5a58fefd3617040fd1cbf0534594d) |
| Comment by Githook User [ 30/Sep/20 ] |
|
Author: {'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}Message: |
| Comment by Githook User [ 29/Sep/20 ] |
|
Author: {'name': 'Huayu Ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}Message: |
| Comment by Githook User [ 24/Sep/20 ] |
|
Author: {'name': 'huayu-ouyang', 'email': 'huayu.ouyang@mongodb.com', 'username': 'huayu-ouyang'}Message: |
| 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? |