[SERVER-30325] Cache transaction progress in the Session object Created: 25/Jul/17  Updated: 30/Oct/23  Resolved: 19/Sep/17

Status: Closed
Project: Core Server
Component/s: Sharding
Affects Version/s: None
Fix Version/s: 3.6.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Kaloian Manassiev Assignee: Kaloian Manassiev
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Duplicate
is duplicated by SERVER-29978 op log observer ids system collection... Closed
Related
related to SERVER-34178 Address lingering issues around TestD... Closed
Backwards Compatibility: Fully Compatible
Sprint: Sharding 2017-10-02
Participants:
Linked BF Score: 0

 Description   

Currently, checking for whether a write operation already executed is done by traversing the transaction's oplog chain. This is very inefficient because it has to be done for every single write operation in order to even find out whether it needs to be retried or not.

In order to optimize this we will keep a cache of the last transaction's executed statements so they can be quickly checked.



 Comments   
Comment by Githook User [ 19/Sep/17 ]

Author:

{'username': 'kaloianm', 'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-30325 Enable tests blacklisted from the retryable writes passthrough suite
Branch: master
https://github.com/mongodb/mongo/commit/f6ed0eba35f3a431b3421ba282316bf537f3ff03

Comment by Githook User [ 19/Sep/17 ]

Author:

{'username': 'kaloianm', 'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-30325 Perform dbhash check in the 'retryable writes' jscore passthrough suite
Branch: master
https://github.com/mongodb/mongo/commit/c8a630fcaf458ca3324c432341b93996f1377c66

Comment by Githook User [ 19/Sep/17 ]

Author:

{'username': 'kaloianm', 'name': 'Kaloian Manassiev', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-30325 Cleanup the logging/retryable writes glue code
Branch: master
https://github.com/mongodb/mongo/commit/7a3c251a0d2a7774bf69f7c0df3c41bb29be0a15

Comment by Max Hirschhorn [ 18/Sep/17 ]

I re-opening this ticket so that Kal can remove the "TODO SERVER-30325" comments that were added as part of integrating the retryable_writes_jscore_passthrough_WT Evergreen task in SERVER-30686.

Comment by Ramon Fernandez Marina [ 15/Sep/17 ]

Author:

{'username': u'kaloianm', 'name': u'Kaloian Manassiev', 'email': u'kaloian.manassiev@mongodb.com'}

Message:SERVER-30325 Add cache of committed statement ids

This makes the check for whether a statement executed take O(1) time
instead of O(size of the batch).
Branch:master
https://github.com/mongodb/mongo/commit/c9e5bcbc0dacfa8031f3a2aaa1c6e369d0bc26c3

Comment by Ramon Fernandez Marina [ 14/Sep/17 ]

Author:

{'username': u'kaloianm', 'name': u'Kaloian Manassiev', 'email': u'kaloian.manassiev@mongodb.com'}

Message:Revert "SERVER-30325 Temporarily exclude dbhash check on "config" database."

This reverts commit 3128427f77397916967e3eb684dfed845bb1638a.
Branch:master
https://github.com/mongodb/mongo/commit/26887268918ff49e4b6a0c4d5cb2fd9602fd6183

Comment by Ramon Fernandez Marina [ 13/Sep/17 ]

Author:

{'username': u'kaloianm', 'name': u'Kaloian Manassiev', 'email': u'kaloian.manassiev@mongodb.com'}

Message:SERVER-30325 Simplify session transaction state maintenance

This change exposes a single 'onWriteCompleted' method on the Session
object, which hides all the concurrency control and the session cache
maintenance.
Branch:master
https://github.com/mongodb/mongo/commit/81111ce63ba47253c9bc3b44c84a4f452fff9f90

Comment by Githook User [ 21/Aug/17 ]

Author:

{'username': 'visemet', 'email': 'max.hirschhorn@mongodb.com', 'name': 'Max Hirschhorn'}

Message: SERVER-30325 Temporarily exclude dbhash check on "config" database.

This should avoid additional Evergreen failures from the
jstestfuzz_replication_initsync and jstestfuzz_replication_initsync_WT
tasks.
Branch: master
https://github.com/mongodb/mongo/commit/3128427f77397916967e3eb684dfed845bb1638a

Comment by Githook User [ 14/Aug/17 ]

Author:

{'name': 'Kaloian Manassiev', 'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-30325 Introduce a getOrCreateSession method on the SessionCatalog
Branch: master
https://github.com/mongodb/mongo/commit/790ac725ecc5f207fc86d4401748529dcaaf93da

Comment by Githook User [ 12/Aug/17 ]

Author:

{'name': 'Kaloian Manassiev', 'username': 'kaloianm', 'email': 'kaloian.manassiev@mongodb.com'}

Message: SERVER-30325 Temporarily exclude the 'config' database from the fuzzer DBHash checks
Branch: master
https://github.com/mongodb/mongo/commit/9245615c3bb7f94f0cbe7fa37b7bb624f64ab08a

Comment by Kaloian Manassiev [ 10/Aug/17 ]

Yes, we are just ironing the final wrinkles in the design. This will allow us to postpone writing the transaction record until the time when we know that a write has actually happened. Sorry for the delay.

Comment by Ian Whalen (Inactive) [ 10/Aug/17 ]

kaloian.manassiev just a heads up that it would be great for the health of the build the sooner this can be worked on - it's currently the top failure in the build with ~130 failures since July 25th.

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