Prevent races by giving each writer its own state.
Recent revisions are kept. Restoring one creates a new revision.