Replica session prediction practice
Attempt before reference code or calibration.
- For x=1, y=2, x=3, list state at each prefix 0–3. Explain why reading a missing key successfully carries a prefix too.
- Give both followers received=3 but applied=1 and 2 respectively. Predict reads requiring 0, 2 and 3. Receipt alone must not satisfy a read guard.
- Write at 1, observe a read at 3, then route to a replica at 1. Compare write-only and merged session tokens.
- Stop the leader while all followers lag behind the token. Define bounded wait/fallback/failure behavior without silently returning stale data.
- Try to apply 2 after receiving only 1. Then try to regress apply from 2 to 1. State which invariant each breaks and what state remains after rejection.
- Construct two streams with the same numeric position but different values. Explain why tokens cannot be compared across them.
- Transfer to a migration: write down who owns the partition at every stage and how the required prefix becomes available to the new owner. Preserve the original Lab 4 retry/crash evidence.
Add three independent executable traces and a written two-shard counterexample. Keep predictions, outputs, corrections and uncertainty separate. Do not label sequence numbers as milliseconds or infer latency from interpreter execution time.