ExportXMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • DB Integration & Observability
    • ALL
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The change stream FSM verifier asserts that the stream delivers exactly one reshardCollection event per resharding command. The server is allowed to emit more than one: the commit notification is sent at the start of ReshardingCoordinator::_commitAndFinishReshardOperation, which is retried as a unit on transient errors, and the code comment in src/mongo/db/s/resharding/resharding_coordinator.inl (introduced by SERVER-113247) says "multiple copies of this event notification are acceptable". There is no server-side dedupe, so the duplicate reaches the stream.

      Additionally, we hit this issue more often now that multiple concurrent reshardings are enabled (SERVER-136621), and retries of critical sections (leading to duplicate change stream notifications) will occur more frequently from the abortUnpreparedTransactionIfNecessary call. If you look at the PR for that ticket, you'll see an explanation of an evergreen patch that hit the error.

       

      We see this same issue for test_change_stream_sharding_fsm_continuous.js – here is a patch that reproduces the issue (all patch links found in SERVER-136621 PR on GitHub) https://spruce.corp.mongodb.com/version/6ae8dc591ed48e0007f056a8/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC

            Assignee:
            Unassigned
            Reporter:
            Anja Kalaba
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: