[SERVER-51057] Test that getMore metrics are incremented in server_status_metrics.js Created: 18/Sep/20 Updated: 29/Oct/23 Resolved: 28/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 4.8.0, 4.4.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Xuerui Fa | Assignee: | Xuerui Fa |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Operating System: | ALL | ||||||||
| Backport Requested: |
v4.7, v4.4
|
||||||||
| Sprint: | Repl 2020-10-05 | ||||||||
| Participants: | |||||||||
| Linked BF Score: | 22 | ||||||||
| Description |
|
In server_status_metrics.js, we test that the number of batches that the secondary has received is equal to the number of getMore commands processed by the primary. For both the primary and the secondary, we record the start and end number, and assert that the number of batches that were processed between the start and the end are equal. We record getMores on the primary in curop and on the secondary in OplogFetcher. When recording the start/end numbers, we are able to make a clean cut on the primary by using the planExecutorHangBeforeShouldWaitForInserts. However, it seems like there could be a race on the secondary if we are using exhaust cursors. Since exhaust cursors don't wait for a batch to be received by the secondary, it is difficult to know when to make a clean cut on the secondary. Unfortunately, it is not possible to wait in the JS test for the number of getMores on the secondary to hit the same number as the primary, because the real number might differ significantly on the primary vs secondary. Some potential solutions:
|
| Comments |
| Comment by Githook User [ 30/Nov/20 ] |
|
Author: {'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}Message: (cherry picked from commit 2cb22c8caaf2be4025d93e5fb75afc8e4be3287e) |
| Comment by Githook User [ 28/Sep/20 ] |
|
Author: {'name': 'XueruiFa', 'email': 'xuerui.fa@mongodb.com', 'username': 'XueruiFa'}Message: |
| Comment by Xuerui Fa [ 24/Sep/20 ] |
|
In triage, we decided to assert that the metrics is increasing on the primary and secondary, instead of asserting that the number of batches processed is strictly equal. CC lingzhi.deng |