[SERVER-33295] Kill long-running snapshot transactions Created: 13/Feb/18  Updated: 29/Oct/23  Resolved: 13/Apr/18

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: 3.7.4

Type: Task Priority: Major - P3
Reporter: Eric Milkie Assignee: Dianna Hohensee (Inactive)
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-34076 Add TransactionLifetimeLimit as a ser... Closed
is depended on by SERVER-34486 Set transactionLifetimeLimitSeconds=1... Closed
Documented
is documented by DOCS-11599 Docs for SERVER-33295: Kill long-runn... Closed
Related
is related to SERVER-35114 Make it possible to adjust the period... Closed
Backwards Compatibility: Fully Compatible
Sprint: Storage NYC 2018-03-26, Storage NYC 2018-04-09, Storage NYC 2018-04-23
Participants:
Linked BF Score: 0

 Description   

From the design,

"Motivation:
The "oldest" open transaction in WiredTiger will pin write history in cache until it finishes. Here, "oldest" means the read timestamp is the earliest of any open transaction on the system. Any write history with a timestamp equal to or newer than this read timestamp must stay pinned in cache, in order to serve the open transaction. We need a way to prevent these transactions from staying open too long, in order to prevent cache pressure from becoming too extreme."

Adding a transactionLifetimeLimitSeconds server parameter, which can be set at startup and via setParameter. Transaction will now expire, per the server parameter, and be asynchronously periodically cleaned up.



 Comments   
Comment by Githook User [ 13/Apr/18 ]

Author:

{'email': 'dianna.hohensee@10gen.com', 'name': 'Dianna Hohensee', 'username': 'DiannaHohensee'}

Message: SERVER-33295 fixing lint
Branch: master
https://github.com/mongodb/mongo/commit/e1c1f549af352f9574f0c54cc8e51ced13e17c61

Comment by Githook User [ 13/Apr/18 ]

Author:

{'email': 'dianna.hohensee@10gen.com', 'name': 'Dianna Hohensee', 'username': 'DiannaHohensee'}

Message: SERVER-33295 Periodic task to check for and kill expired transactions.

(Adding a new int server parameter 'transactionLifetimeLimitSeconds'.)
Branch: master
https://github.com/mongodb/mongo/commit/4f0c2f4047bdafe7a5d952a9671bf436a763c4d5

Comment by Siyuan Zhou [ 04/Apr/18 ]

Removing the dependency of SERVER-33432 since commitTransaction on aborted transactions returns NoSuchTransaction which should be sufficient to check aborted transaction.

Comment by Dianna Hohensee (Inactive) [ 27/Mar/18 ]

Depends on SERVER-33432 making it an error to reuse old txn ids. Otherwise, I cannot test that a transaction was aborted by the background thread as expected: the insert just succeeds, beginning a new transaction with the same txn id.

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