Commit 8f0c9a8
committed
fix(session): re-verify local vShard ownership before the durable WAL append
run_commit resolves a vShard as Local, but a leadership handoff can
land during the ResolveTxn await that follows. Without a re-check right
before the durable append, the transaction redo could be written to a
WAL this node no longer owns, and the later batch dispatch (which
re-resolves leadership) would then reject the now-non-local commit,
leaving an orphaned durable redo record while the client is told the
commit aborted. Abort before any durable write instead, so the failure
stays side-effect-free and the client's retry can route through
Calvin's replicated barrier.1 parent 3b95bf2 commit 8f0c9a8
1 file changed
Lines changed: 20 additions & 0 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
338 | 358 | | |
339 | 359 | | |
340 | 360 | | |
| |||
0 commit comments