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

_configsvrCommitSplitChunk is not waiting for opTime on early return

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9.0
    • Component/s: Sharding
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2020-11-02
    • Linked BF Score:
      26

      Description

      If a command on the config server performs an early return without doing a write, it is expected that they will setLastOpToSystemLastOpTime (like commitChunkMerge) that way it is ensured that future reads will see the changes majority committed by previous operations.

      When committing a chunk split the original chunk is searched, and if not found, then an error is returned, however, the following scenario might happen:

      1. A _configsvrcommitSplitChunk is sent from a shard
      2. The connection drops but the commit is successful on the primary
      3. The command is retried but it returns early
      4. Another split command is issued
      5. The collection metadata is refreshed

      Step 5 might not see the changes committed on 3 because if the changes haven't been majority written by the time the refresh happens, the effects of the split will not be seen on the shard if a non primary node is queried, causing a precondition failure (the range determined on the router is the precondition sent later on) on the next applyOps.

        Attachments

          Activity

            People

            Assignee:
            pierlauro.sciarelli Pierlauro Sciarelli
            Reporter:
            marcos.grillo Marcos José Grillo Ramirez
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: