[SERVER-64215] Interrupt OplogBufferMock::waitForData on shutdown Created: 04/Mar/22 Updated: 29/Oct/23 Resolved: 05/Mar/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0-rc0, 5.0.10 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Tommaso Tocci | Assignee: | Tommaso Tocci |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | testing | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Sprint: | Sharding EMEA 2022-03-07 | ||||
| Participants: | |||||
| Description |
|
tenant_oplog_applier_test takes ~36 seconds to run. This slowness is due to the shutdown & join of the TenantOplogApplier that is done at the end of every test case. In particular as part of the shutdown of the TenantOplogApplier we shutdown also the underlying _oplogBatcher. The problem is that when we shutdown the TenantOplogBatcher, the batcher won't actually move to the kComplete state until the last call to _oplogBuffer->waitForData(Seconds(1)) complete. In order to reduce this delay we should shutdown the oplogBuffer before to join the TenantOplogApplier that is using it and make that this shoutdown interrupts also the waiForData function. With the proposed changes the test run time drop from ~36 seconds to ~2 seconds. |
| Comments |
| Comment by Githook User [ 22/Jun/22 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: (cherry picked from commit a66c6e95cda3a4bdb8a3ab2e5f253c4635a6dd5b) |
| Comment by Matthew Russotto [ 14/Jun/22 ] |
|
The oplog buffer changes (allowing shutdown to interrupt oplog buffer wais) were backported to make |
| Comment by Githook User [ 04/Mar/22 ] |
|
Author: {'name': 'Tommaso Tocci', 'email': 'tommaso.tocci@mongodb.com', 'username': 'toto-dev'}Message: |