[SERVER-63047] Make delete batches fully transactional Created: 27/Jan/22  Updated: 29/Oct/23  Resolved: 25/Mar/22

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

Type: Task Priority: Major - P3
Reporter: Josef Ahmad Assignee: Josef Ahmad
Resolution: Fixed Votes: 0
Labels: PM-2227-M2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-64206 Address cyclic dependency between que... Closed
Related
related to SERVER-64506 Unify replication back-end of Transac... Backlog
related to SERVER-75759 unify call to MongoDSessionCatalog in... Closed
Backwards Compatibility: Fully Compatible
Sprint: Execution Team 2022-03-21, Execution Team 2022-04-04
Participants:
Linked BF Score: 67

 Description   

A batch involves a single storage transaction on the primary, however it replicates as multiple oplog entries. This behaviour is generally described in SERVER-55909. An additional goal for batched deletions is performance, as multiple oplog entries and timestamping introduce overhead.

Add a mechanism to emit a single oplog entry and timestamp per batch. Explore integration with the internal API for multi-document transactions.



 Comments   
Comment by Githook User [ 24/Mar/22 ]

Author:

{'name': 'Josef Ahmad', 'email': 'josef.ahmad@mongodb.com', 'username': 'josefahmad'}

Message: SERVER-63047 Make delete batches fully transactional
Branch: master
https://github.com/mongodb/mongo/commit/16227df086c840630ded6e4304fd25c04b7fac6b

Comment by Githook User [ 24/Mar/22 ]

Author:

{'name': 'Josef Ahmad', 'email': 'josef.ahmad@mongodb.com', 'username': 'josefahmad'}

Message: SERVER-63047 Make delete batches fully transactional
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/b8199ccfdf2321326b846fd82772b86b75c19418

Comment by Josef Ahmad [ 04/Mar/22 ]

I've split the first task from the list above into SERVER-64206.

Comment by Josef Ahmad [ 04/Mar/22 ]

Summary of the main tasks needed to use the internal multi-document transaction API for batching deletes.

  • Address a cyclic library dependency between libquery_exec and libtransaction.
    libtransaction depends on libquery_exec as the transaction history iterator uses the query executor. Just making the batched delete stage use transactions creates a cyclic dependency: libquery_exec -> libtransaction -> libquery_exec.
  • Address invariants in the MongoDOperationContextSession and TransactionParticipant classes relating to hierarchical lock state. The batched delete stage is likely the first consumer at this lower level in the stack.
  • Mitigate or exempt the batched deleter from the overhead of SERVER-62602 which may not be needed for transactions whose entire lifespan is at this low level in the stack.
Generated at Thu Feb 08 05:56:46 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.