The disagg standby logged "Accepting reads after receiving checkpoint with oplog." (10985482) before setting `_canServeReads`, so a read gated on that log line could still fail with `NotPrimaryOrSecondary` during the few milliseconds of post-checkpoint-load work in between (consistent-data-available callbacks, metrics). Over 20 disagg_storage jstests gate standby reads on that line via `checkLog` (300 ms poll). The window grew from about 1 ms to 5 ms in early July, which made the race fail roughly 1.5% of runs (BF-44874, streak since Jul 15).
Move the log to right after `_canServeReads.store(true)` and pin the ordering with a unit test and a jstest built on the `hangBeforeStartingOplogApplicationAfterCheckpointLoad` failpoint, which sits inside the old window.
- related to
-
SERVER-131970 Log accepting reads on the disagg standby only after RS_SECONDARY publishes
-
- In Code Review
-