-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
except Exception as e:
print(f"Failed to append to TSV: {e}", file=sys.stderr)
# FIXME: Issue #22 (https://github.com/LDFLK/research/issues/22) - Potential data inconsistency between DB and TSV.
# We don't rollback DB?
# Ideally we should, but for this "hacky" feature, DB is primary for UI, TSV is archival.
passThe comment "We don't rollback DB? Ideally we should, but for this 'hacky' feature, DB is primary for UI, TSV is archival." highlights a potential data inconsistency.
If the TSV write fails, the database will still contain the new act, but the archival TSV will be out of sync. This could lead to issues if the TSV is later used as a source of truth or for rebuilding the database.
Consider implementing a transaction to ensure atomicity (either both DB and TSV succeed or both fail) or at least a more robust error handling mechanism (e.g., retries, explicit rollback, or a clear warning to the user) to maintain data consistency.
Metadata
Metadata
Assignees
Labels
No labels