[SERVER-78275] Add jstests for endOfTransaction change stream event Created: 21/Jun/23  Updated: 23/Jun/23

Status: Backlog
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Ivan Fefer Assignee: Backlog - Query Execution
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Execution
Participants:

 Description   

Several tests must be implemented for this project:

  1. Basic tests that run transactions and check if the endOfTransaction event is present in the change stream. They will use passthrough suites to cover replica set / sharded cluster variants.
  2. No passthrough tests that should check corner-cases for multi-shard transaction including:
  3. Transaction that affects different collections: both sharded and unsharded.
  4. Transaction that affects different databases with different primary shards. 
  5. In cases where multiple namespaces are affected by a transaction, change streams on each of the namespaces should be asserted to have corresponding endOfTransaction events.
  6. In parallel with transactions, move around chunks of the affected collections.

Tests should also assert that change streams on namespaces, not affected by a transaction, do NOT have stray endOfTransaction events.

If a change stream is associated with a particular namespace, end of transaction events should only contain mentions of this namespace.



 Comments   
Comment by Ivan Fefer [ 23/Jun/23 ]

We also should test resume tokens: if we pass resumeAfter as the last operation in a transaction, we should still see endOfTransaction event.

Generated at Thu Feb 08 06:37:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.