Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-97174

validate command on secondaries reads unfinished oplog batch

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.2.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • RSS Sydney
    • Fully Compatible
    • ALL
    • v8.1, v8.0
    • Hide

      Apply diff and run attached test.

      Show
      Apply diff and run attached test.
    • TeamTummy - 2024-11-26, Hoity-Toity - 2024-12-10, SleighTheDay - 2024-12-24, SongingMoose - 2025-01-07, NamePending - 2025-01-21, MooseOnTheLoose - 2025-02-04, FarewellDaniel - 2025-02-18, HappyAddy - 2025-03-04, PastaLaVista - 2025-03-18
    • 0
    • None
    • 0
    • None
    • None
    • None
    • None
    • None
    • None

      AutoGetCollection or acquisitions set the appropriate ReadSource depending on the context. This should be lastApplied for secondaries, to prevent reading in the middle of oplog batch application.

      However, ValidateState::initializeCollection manually performs locking, and thus the ReadSource is not correctly established. This leads to "validate" reading using the default kNoTimestamp read source, even on secondaries. And can cause incorrect validate results.

        1. BF-35599.diff
          2 kB
        2. bf-35599.js
          2 kB

            Assignee:
            clarisse.cheah@mongodb.com Clarisse Cheah
            Reporter:
            yujin.kang@mongodb.com Yujin Kang Park
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: