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

Shard does not call config commit chunk migration command with majority writeConcern nor checks for writeConcern errors.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.4.11, 3.6.2, 3.7.1
    • Component/s: Sharding
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v3.6, v3.4
    • Sprint:
      Sharding 2017-12-18
    • Case:

      Description

      From visual inspection of the code, MigrationSourceManager::commitChunkMetadataOnConfig does not check the command response for writeConcernStatus, nor does it send majority write concern in the command.

      On the config server, ShardingCatalogManager::commitChunkMigration does not appear to include majority write concern in its final write. This was probably because we used to take a lock twice to nest and prevent yielding, which makes yielding to wait for replication impossible, in order to enforce serialization of commits. Now, however, we use a _kChunkOpLock to serialize operations, no longer taking locks. These kind of comments should also be removed: https://github.com/mongodb/mongo/blob/e37db69674486dff9fdac2b5ee41961a8805804b/src/mongo/s/catalog/sharding_catalog_manager_chunk_operations.cpp#L223-L225

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: