US07-04: Prove Concurrency and Crash Recovery (#86)
This commit was merged in pull request #86.
This commit is contained in:
@@ -81,7 +81,17 @@ ALLOWED_TRANSITIONS = {
|
||||
|
||||
TERMINAL_STATES = frozenset({JournalState.COMPLETE, JournalState.ROLLED_BACK})
|
||||
# States where the disk may already have been touched by this operation.
|
||||
UNSAFE_STATES = frozenset({JournalState.MOVING, JournalState.MOVED, JournalState.DATABASE_UPDATED})
|
||||
# ``rollback_required`` belongs here too (US07-04): the move happened and someone
|
||||
# has to decide what to do about it, so the library is not in a state another
|
||||
# mutation may build on.
|
||||
UNSAFE_STATES = frozenset(
|
||||
{
|
||||
JournalState.MOVING,
|
||||
JournalState.MOVED,
|
||||
JournalState.DATABASE_UPDATED,
|
||||
JournalState.ROLLBACK_REQUIRED,
|
||||
}
|
||||
)
|
||||
|
||||
RESUMABLE = "resumable"
|
||||
ROLLBACK_SAFE = "rollback_safe"
|
||||
|
||||
Reference in New Issue
Block a user