-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 5.0.0, 6.0.0, 7.0.0, 7.3.0, 8.0.0-rc2
-
Component/s: Sharding
-
Cluster Scalability
-
Fully Compatible
-
ALL
-
v8.0, v7.3, v7.0, v6.0, v5.0
Resharding preserves the full retryability history for any retryable writes which occur during the resharding operation. If a chunk migration follows the resharding, session migration should transfer the relevant write history over to the recipient of the chunk. The way chunk migration checks for whether an oplog is relevant is by filtering on the namespace being migrated.
The problem is that when resharding recipients update their config.transactions table (based on the retryable writes/transactions performed on the donor shard), it creates a noop oplog entry with the namespace set to empty. If the resharding recipient then becomes the donor in the following chunk migration, due to the empty namespace, it will incorrectly conclude that this oplog entry isn't relevant to the chunk actively being migrated. As a result, the noop oplog entry for the already executed retryable write never gets migrated and the retryable write could be executed again after the chunk migration commits.
Adding Max's repro for this issue:
- Start a resharding operation
- Run a retryable $inc update during the resharding operation
- Resharding operation completes
- Run chunk migration
- Retry retryable write from (2) and verify no new oplog entry was generated
- is caused by
-
SERVER-49904 Update config.transactions entry for retryable writes during resharding's oplog application
- Closed
- is related to
-
SERVER-89452 Avoid adding empty namespaces to txnParticipant's affectedNamespaces
- Closed
-
SERVER-55384 Move session application for resharding's oplog application into its own class
- Closed