Two servers load the same world and each one overwrites the other's progress
After a restart, a slow or hung server can wake up and keep saving as if nothing had happened while a new one already runs the world. Here is how a world can only be held by one server at a time, and how the old one is stopped even when it does not know.
Why this works
A server cannot know that it has been frozen, so it cannot check its own right to write. The place that stores the world can: it remembers the newest owner and turns away anyone older. The final check belongs where the damage would happen.
When not to use it
Do not build this for one small server run by you alone, or for a world that is never hosted twice. A simple lock file or one fixed machine is enough. It is also not a cure when the store itself cannot refuse old writes.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 22 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Two servers load the same world and each one overwrites the other's progress" (read_entry one-server-per-world-with-a-lease) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP