diff --git a/api/operation.py b/api/operation.py index 335fee1..50fca6a 100644 --- a/api/operation.py +++ b/api/operation.py @@ -177,10 +177,10 @@ def pick_snapshot(name: str, tag: str) -> None: cur.execute(f"update operation set redo_child = '{target}' where id = '{target_parents[1]}'") execute_redo(name) -# transaction is volatile, commit/rollback will destroy transaction. -# can not redo a rollback transaction. +# transaction is volatile, commit/abort will destroy transaction. +# can not redo an aborted transaction. # but can undo a committed transaction... inconsistent... -# it may remove snapshot tag if snapshot in a rollback transaction +# it may remove snapshot if it is in aborted transaction def have_transaction(name: str) -> bool: with conn[name].cursor(row_factory=dict_row) as cur: @@ -189,7 +189,7 @@ def have_transaction(name: str) -> bool: def start_transaction(name: str, strict: bool = False) -> None: if have_transaction(name): - print("Only support single transaction now, please commit/rollback current transaction!") + print("Only support single transaction now, please commit/abort current transaction!") return curr = _get_current_operation(name)