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

Ensure all no-op entries are inserted before the recipient reads opLog in the unit test OplogApplierResumesFromLastNoOpOplogEntry

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 5.3.0
    • None
    • None
    • None
    • Fully Compatible
    • ALL
    • Server Serverless 2021-12-13, Server Serverless 2021-12-27
    • 24

    Description

      In the unit test  OplogApplierResumesFromLastNoOpOplogEntry, the test inserts 2 no-op entries to opLog and expects the recipient use the timestamp of the second entry to be the opLog applier’s beginApplingOpTime. 

      But, the test doesn't have any way of knowing where the recipient service thread is when it does those two inserts. It is possible the recipient reads the opLog while only the first entry has been inserted. Here is the related issue BF-23416.

      To reproduce the test case issue, add "sleepmillis(5*1000);" just before the second inserting https://github.com/mongodb/mongo/blob/b4517954a706b9f49b17d423f179113aa8632565/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp#L2007 

      To fix the issue, we will set the fpAfterStartingOplogFetcherMigrationRecipientInstance , and then turn it off after inserting.

      Attachments

        Activity

          People

            sophia.tan@mongodb.com Sophia Tan
            sophia.tan@mongodb.com Sophia Tan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: