[SERVER-80272] Make too_stale_secondary.js oplog rollover more deterministic Created: 21/Aug/23  Updated: 05/Feb/24

Status: In Progress
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Kaitlin Mahar Assignee: Kaitlin Mahar
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Operating System: ALL
Sprint: Repl 2024-03-18
Participants:
Linked BF Score: 0

 Description   

Currently, the approach this test uses to make the primary oplog rollover is to just repeatedly insert until we observe the first oplog entry has changed.

This does not lead to a deterministic number of inserts being done, and in certain rare situations it is possible that we do enough inserts to overflow both the primary and secondary oplogs before the primary oplog is truncated, which can cause this test to fail.

We should switch this test to use an approach similar to / the same as oplog_rollover_test.js which performs a specific number of inserts that should overflow the oplog and additionally uses a failpoint to pause the oplog cap maintainer thread as needed to make its behavior more predictable. See the comments in that test for details.


Generated at Thu Feb 08 06:43:07 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.