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

Interrupt OplogBufferMock::waitForData on shutdown

    XMLWordPrintable

Details

    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • None
    • 6.0.0-rc0, 5.0.10
    • None
    • Fully Compatible
    • Sharding EMEA 2022-03-07

    Description

      tenant_oplog_applier_test takes ~36 seconds to run. This slowness is due to the shutdown & join of the TenantOplogApplier that is done at the end of every test case.

      In particular as part of the shutdown of the TenantOplogApplier we shutdown also the underlying _oplogBatcher.

      The problem is that when we shutdown the TenantOplogBatcher, the batcher won't actually move to the kComplete state until the last call to _oplogBuffer->waitForData(Seconds(1)) complete.
      So practically every time a test case end it will block 1 seconds waiting to join the TenantOplogApplier.

      In order to reduce this delay we should shutdown the oplogBuffer before to join the TenantOplogApplier that is using it and make that this shoutdown interrupts also the waiForData function.

      With the proposed changes the test run time drop from ~36 seconds to ~2 seconds.

      Attachments

        Activity

          People

            tommaso.tocci@mongodb.com Tommaso Tocci
            tommaso.tocci@mongodb.com Tommaso Tocci
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: