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.

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.4.11, 3.6.2, 3.7.1
    • Affects Version/s: None
    • Component/s: Sharding
    • Labels:
      None
    • Fully Compatible
    • ALL
    • v3.6, v3.4
    • Sharding 2017-12-18

      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

            Assignee:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: