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

Remove _kChunkOpLock lock

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • Sharding
    • None
    • Catalog and Routing

    Description

      Currently chunk operations are serialized by the _kChunkOpLock, which is taken whenever there is a metadata change in the config.chunks collection in the config server (for example split, merge, chunk migrations, refine collection shard key, among much others). In the case of split/merge/migration, this has the unfortunate side effect of serializing operations that belongs to complete different collections, even though, this is not actually necessary.

      We could increase the level of parallelization for DDL operations by refining the synchronization to a more fine-grained degree, for example, at the chunk level. This could be achieved by first making all operations under the lock to be performed in a transaction, and then, as part of the transaction we could search for the chunk with the collection version, and then doing a dummy write at the document level (for example, increasing a dummy counter). The result of this would be having ConflictingOperationInProgress errors when trying to commit two concurrent operations on the same collection, which could be retried by an upper layer (i.e. by DDLCoordinators).

      Attachments

        Activity

          People

            backlog-server-catalog-and-routing Backlog - Catalog and Routing
            marcos.grillo@mongodb.com Marcos José Grillo Ramirez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: