ExportXMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • 9.1.0-rc0, 9.1.0-rc1026
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Add the transaction-centric test model and its walk generator to the change stream FSM framework, for endOfTransaction (SPM-4826) testing.

      Scope of Work

      * Create jstests/libs/util/change_stream/change_stream_txn_test_model.js — TxnAction/TxnState enums (kept separate from the sharding Action/State so each model's all-edges coverage check stays scoped) and TransactionTestModel: RS graph (3 in-txn states) vs sharded graph (7 states, sharded/unsharded splits) behind a topology flag, shape knobs, getStartState().
      * Extend jstests/libs/util/change_stream/change_stream_commands.js — TxnContext, the CommittedTxn envelope, BeginTxnCommand/TxnOpCommand/CommitTxnCommand/AbortTxnCommand, fromSpec dispatch, session-aware Command/InsertDocCommand; per-txn event prediction returns CommittedTxn envelopes; CommitTxnCommand.execute runs nested ops then commitTransaction_forTesting().
      * Create jstests/libs/util/change_stream/change_stream_txn_command_generator.js — TxnCommandGenerator extends FsmCommandGenerator (SERVER-139139): collection-first fixture resolution, txn accumulation in the walk context, walk-end closure; TxnCommandGeneratorParams, kShardRangeWidth.
      * Extend jstests/libs/util/change_stream/change_stream_writer.js — optional sessionLsid run option: the writer thread holds ONE shell session (deterministic UUID derived from the label), txn commands execute against it.
      * Create jstests/change_stream_fsm/test_change_stream_txn_command_generator.js + the change_streams_txn_command_generator suite — golden walk sequences, pool logic, RS execution tests.

      Acceptance Criteria

      * change_streams_txn_command_generator suite passes.
      * change_streams_sharding_command_generator and change_streams_sharding_fsm still pass (shared files touched only additively).

      Notes

      * Spike: eot-fsm-spike branch (commits 3ad6df4, 9f908dc, c98d446, fe4b6a1, 98c6180).
      * Plan: docs/superpowers/plans/2026-11-05-eot-fsm-test-model.md Tasks 2-5.

            Assignee:
            Denis Grebennicov
            Reporter:
            Denis Grebennicov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: