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

ClearReshardingFilteringMetadata unittest constructs a POS but does not set all required fields the resharding recipient state document

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: Sharding
    • None
    • Fully Compatible
    • Sharding 2021-04-05
    • 64
    • 1

      The ClearReshardingFilteringMetadata extends from the ReshardingDonorRecipientCommonTest fixture which registers the resharding PrimaryOnlyServices.

      The test creates this recipient document, which lacks a FetchTimestamp field. If rebuilding the primary only service reads this state document (when rebuilding on stepup), we'll hit this invariant for lacking a fetchTimestamp.

      We can hit this failure if the two conditions are met:

      • The unittest runs before RecipientStateMachine onStepUp is run. (such that it would see the bad document).
      • The RecipientStateMachine onStepUp method is run prior to the unittest completion which triggers POS::onShutDown (which would cause the onStepUp to cooperatively early-exit prior to hitting the invariant).

            Assignee:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Reporter:
            daniel.gottlieb@mongodb.com Daniel Gottlieb (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: