Worked case · Waking up elsewhere
Starting again when a bookmark has expired
How is a view rebuilt when the saved position can no longer be continued?
You saved position 2 long ago, when you could see A. The service no longer keeps the changes that far back. It answers with a snapshot of what you may see now, and a new position.
- position 2too old to continue
- snapshotsees D · position 5
- view: Dposition 5
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": 2,
"visible": [
"A"
],
"withdrawn": [],
"logical_writes": 0
},
"steps": [
{
"delivery": "bookmark_expired",
"saved_read_bookmark": 2
},
{
"delivery": "snapshot",
"visible": [
"D"
],
"continuation": 5
}
]
}Work it out before you look.
Reveal the expected viewHide the expected view
Take the snapshot as the whole view: D is visible and the new position is 5. Do not merge it with the old view. A is absent from the snapshot and the snapshot does not say why, so A leaves the view without being marked withdrawn.
{
"read_bookmark": 5,
"visible": [
"D"
],
"withdrawn": [],
"logical_writes": 0
}