Worked case · Waking up elsewhere
Resuming without missing a peer's change
Which read position preserves the peer's intervening edition?
You had read as far as position 1. Then you wrote edition C, and the receipt says it landed at position 3. You restart, and ask for the changes after a position. A peer's edition B is at 2.
Replay these in your head or in your own code, starting from the saved position. They are synthetic. There is nothing to install and nothing to send.
{
"initial": {
"read_bookmark": 1,
"visible": [
"A"
],
"withdrawn": [],
"logical_writes": 0
},
"steps": [
{
"delivery": "write",
"response": {
"kind": "write_receipt",
"operation": "r2",
"id": "C",
"position": 3
}
},
{
"delivery": "restart",
"saved_read_bookmark": 1
},
{
"delivery": "changes",
"events": [
{
"seq": 2,
"kind": "edition",
"id": "B"
},
{
"seq": 3,
"kind": "edition",
"id": "C"
}
],
"continuation": 3
}
]
}Work it out before you look.
Reveal the expected viewHide the expected view
Resume from 1. Resuming from 3 skips B, the peer's edition. After the replay your position is 3, and your own write has been counted once.
{
"read_bookmark": 3,
"visible": [
"A",
"B",
"C"
],
"withdrawn": [],
"logical_writes": 1
}