-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Test Model
-
None
-
Storage Engines - Persistence
-
195.963
-
StorEng - Defined Pipeline
-
None
Larger Context
This ticket adds the core role-relative switch_role operation for deterministic single-node switch-mode workloads. It depends on the follower-mode foundation from WT-18867.
Motivation
test/model needs one operation that changes the current role and can be called repeatedly from either role.
Scope
Add switch_role to the workload format, parsing, serialisation, model runner, and WiredTiger runner. Track the current role dynamically. The initial contract requires no active transactions across a transition and resets workload cursors and sessions at the boundary. Stable must cover completed writes before the transition.
The transition sequence depends on the current role:
- From leader, take a checkpoint and reconfigure to follower.
- From follower, reconfigure to leader and take a checkpoint.
Add fixed workloads for each direction and repeated transitions. Add workload validation and counterexample-reduction handling for switch_role.
Acceptance Criteria
- Fixed workloads pass for each direction and repeated transitions.
- No active transaction, cursor, or workload session crosses a transition.
- Stable and checkpoint operations occur in the required order for the current role.
- Model and WiredTiger return codes and final recovered table contents match.
- Reduced workloads contain valid role-relative switch_role operations.
Outcome
Test/model provides one synchronous role-transition operation for deterministic single-node workloads.