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

Missing early return in merge_chunks_command.cpp

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1.7
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Sharding 2019-01-28
    • Linked BF Score:
      0

      Description

      To commit a mergeChunk, the shard merging the chunks sends _configsvrMergeChunkCommit to the CSRS, which atomically updates the chunks collection. If the response to this request is lost, the shard will retry, but may receive an error if the first attempt finished successfully. Because of this, the shard checks if the metadata was updated after getting a failed response.

      Currently the shard logs a message in this case and will still throw with the failed response, but before the refactor in this commit for SERVER-32198, it returned Status::OK(). This change in behavior was likely unintentional and can be fixed by returning Status::OK() here.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: