-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 8.0.0
-
Component/s: None
-
None
-
Replication
-
Fully Compatible
-
ALL
-
Repl 2024-10-28, Repl 2024-11-11
-
200
MigrationChunkClonerSourceOpObserver::onBatchedWriteCommit installs an onCommit handler LogRetryableApplyOpsForShardingHandler, passing the list of TransactionParticipant's affectedNamespaces to its constructor. Later, when the handler executes, for each of these namespaces it will get the CollectionShardingState associated to it by calling CollectionShardingRuntime::assertCollectionLockedAndAcquireShared. assertCollectionLockedAndAcquireShared has a dassert that states that the collection lock for that namespace should be held in at least IX mode by this opCtx.
However, this assertion does not hold true in all situations. An example of a violation is a bulkWrite affecting two different collections: In this case, the first write in the bulkWrite batch will add collectionA to the TransactionParticipant's affectedNamespaces, and later the following writes in that same bulkWrite will observe the first collection in the affectedNamespaces but the locks for it won't be held.
- is caused by
-
SERVER-87127 Make chunk migration handle vectored inserts replicated transactionally.
- Closed