[SERVER-38844] SessionMigrationSource should explicitly ignore config.transactions entry meant for transactions Created: 04/Jan/19  Updated: 29/Oct/23  Resolved: 07/Feb/19

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: 4.1.6
Fix Version/s: 4.1.8

Type: Task Priority: Major - P3
Reporter: Randolph Tan Assignee: Randolph Tan
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Related
related to SERVER-51750 config.transactions cloner for reshar... Closed
is related to SERVER-40475 Migrate info that retryable write has... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2019-01-28, Sharding 2019-02-11
Participants:
Linked BF Score: 36

 Description   

Currently, there is no need to transfer transaction related state from one shard to another because it is not possible for transactions to run across migration boundaries. In most cases, this is already true because of the fact that:

1. Transaction related oplog entries have non-sensical ns field, like admin.$cmd for prepare entries, so they get naturally filtered out.
2. Transaction related ops don't have opTime assigned to them during the opObserver onInsert/Update/Delete, so they don't get transferred during session xferMod phase.

However, in the case when the transaction commits but the oplog entry it points to gets truncated (because oplog rolled over), the session migrate will generate a sentinel oplog entry that will get sent to the destination side to let it know that the retryable write history is incomplete. Once it gets to the other side, it will realize that the transaction is committed and it will error out since it will be trying to process the oplog entry as if it was for a retryable write (specifically, it will trigger this assert via _registerUpdateCacheOnCommit callback registered by onMigrateCompletedOnPrimary).



 Comments   
Comment by Githook User [ 07/Feb/19 ]

Author:

{'name': 'Randolph Tan', 'email': 'randolph@10gen.com', 'username': 'renctan'}

Message: SERVER-38844 SessionMigrationSource should explicitly ignore config.transactions entry meant for transactions
Branch: master
https://github.com/mongodb/mongo/commit/1ae75d69fddc6ee9d5cc4f9df8b7732337555469

Generated at Thu Feb 08 04:50:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.