ShardingCatalogManager::updateTimeSeriesGranularity does not take _kChunkOpLock

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 6.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Fully Compatible
    • ALL
    • Sharding EMEA 2022-12-26, Sharding EMEA 2023-01-09, Sharding EMEA 2023-01-23
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      ShardingCatalogManager::updateTimeSeriesGranularity calls bumpMajorVersionOneChunkPerShard, which was originally meant to be called with the _kChunkOpLock held. This is needed because bumpMajorVersionOneChunkPerShard will need to compute a new updated collectionVersion, so this requires serializing with any other possible update the collection version. However, updateTimeSeriesGranularity is not taking _kChunkOpLock.

      This ticket is to take _kChunksOpLock in updateTimeSeriesGranularity and also to add a comment on bumpMajorVersionOneChunkPerShard's declaration noting that it requires that lock to be held. Additionally, we could add an invariant that the lock is held.

              Assignee:
              Antonio Fuschetto
              Reporter:
              Jordi Serra Torrens
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: