Save deleted players in the same file as player data

The tombstones lived in player_sync_deleted.json, written after
player_sync.json. A stop between the two writes lost the tombstone of a
fresh delete, and the next upload from an old copy brought the deleted
data back. Deleted players are now entries with deleted: true in
player_sync.json, so both are written in one safeOutputFile call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-17 19:12:39 +00:00
1 parent c260baaf03
commit 2529683c2b
3 files changed
+42 -30

No files matched your search

+1 -1
View File
@@ -49,7 +49,7 @@ Importing and deleting both start a new epoch for the player.
An instance holding a copy from an earlier epoch throws it away the next time the player joins, even if it is newer than what the controller has, and an upload from an earlier epoch is discarded.
After an import the instance downloads the new data.
After a delete the next join turns whatever the player has on that instance into the new synced inventory.
Deleted players stay listed in `player_sync_deleted.json` in the database directory so their epoch survives a controller restart.
Deleted players stay in `player_sync.json` as an entry with `deleted: true` so their epoch survives a controller restart.
Both are refused while an instance holds the lock on the player, because the instance uploads its own copy when the player leaves and that would undo the change.
Have the player leave first, or release the lock if the instance is stuck holding it.