Move the shown cursor of each session to its last event: schema version 3 #75
Loading…
Reference in a new issue
No description provided.
Delete branch "server-shown-head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
From roomcity-ee, after specs-58's review of #68 (the shown cursor): on the city the
showncolumn of version 2 is stale. Nothing moved it since the migration to version 2 put it at the head of that moment (09:16Z: guest 1096 of 1166, host 631), so the first server that keeps the cursor would show each room again from there.Schema version 3:
UPDATE sessions SET shown = COALESCE((SELECT MAX(seq) FROM events WHERE events.session = sessions.name), 0), applied when the server opens a version-2 database, in the same transaction mechanism as version 2's, and after the copy of the database as it was (roomcity.v2.<time>.db, from #64's copy). A database of version 1 goes through both. A later version is refused as before.Test: a version-2 store whose cursors are behind the head (guest's at 2 of 6, host's at 0 of 1) is moved to the head, is of version 3, has made the version-2 copy, and a version-3 database is not moved or copied again; the two tests of version 1 now expect version 3.
#68 should not merge before this.
Assisted-By: Claude noreply@anthropic.com
003c89ca89641ab522cc641ab522cc478742947e478742947eb1b325b806