Update comment

This commit is contained in:
wqy
2022-09-03 10:33:27 +08:00
parent 0832e557fe
commit f16a16991e

View File

@@ -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)