Log "Accepting reads" on the disagg standby only after reads are servable

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.1.0-rc0
    • Affects Version/s: None
    • Component/s: Storage
    • None
    • Query Optimization
    • Fully Compatible
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Henri Nikku
            Reporter:
            Henri Nikku
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: