summaryrefslogtreecommitdiff
path: root/docs/src/guide/patch-notes
diff options
context:
space:
mode:
authorSho Sakuma <me@m1sk9.dev>2026-08-05 03:32:11 +0900
committerSho Sakuma <me@m1sk9.dev>2026-08-05 03:32:22 +0900
commit7ed4bbbcf375c4f136a3b90bb6105c278901f654 (patch)
tree7244202ebd1dd8915d34f1be0cd7d6e7aa423041 /docs/src/guide/patch-notes
parent5a20137f7822e7aa3a37716da2e3a450bc6cea96 (diff)
downloadLunaticChat-7ed4bbbcf375c4f136a3b90bb6105c278901f654.tar.gz
LunaticChat-7ed4bbbcf375c4f136a3b90bb6105c278901f654.tar.bz2
LunaticChat-7ed4bbbcf375c4f136a3b90bb6105c278901f654.zip
refactor: make durability and teardown properties of the layer, not habits
Atomicity was opt-in per write site, so a file added later was safe only if its author noticed the convention. Worse, DebouncedSaver drops a request while one is pending and so serves exactly one file - a rule held up only by the wiring happening to construct a separate saver per file, and written down nowhere. A FileStore now owns its file, its atomic write and its own saver, so neither can be got wrong by wiring; writeTextAtomically is internal to the package. Taking the Bukkit plugin out of DebouncedSaver in favour of an AsyncScheduler makes the debounce testable at all: ChannelStorage's "the snapshot is taken when the write runs" now runs against the real thing rather than a mocked saver. Teardown gets the same treatment. The five services with shutdown work spelled it saveToDisk() three times and shutdown() twice, and the list of them was hand-maintained against a fourteen-field container - so a new service was not stopped unless someone remembered a second place. They now implement StoppableService and register as they are built, and shutdown iterates that list. stop() delegates rather than renames, because the conversion cache's periodic flush is a different caller from shutdown. Also here, on files this commit already touches: player settings carry a dirty flag, since updateSettings is the only writer and queues its own save, so every quit was re-serializing every stored player to write identical bytes; and setPlayerChannel returns early when nothing moved, because the quit path clears the active channel for every player whether or not they had one, and a mass disconnect paid a full snapshot per player in one tick. Co-Authored-By: Claude <noreply@anthropic.com>
Diffstat (limited to 'docs/src/guide/patch-notes')
0 files changed, 0 insertions, 0 deletions