Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

fix(remote): use UUID operation IDs, stop reusing terminal rows

2 months ago

bc4665f
Authored
Davy7/20/2026, 10:43:36 PM
Operation IDs were derived from song_id (publish-{song_id}) or timestamp
(publish-batch-{now}), causing terminal rows to be reused on re-publish.
A second publish of the same song would find the existing Completed row
and short-circuit, silently skipping the actual upload.

Changes:
- mutation.rs: generate a UUID v4 for every mutation outbox row
- publish.rs: generate a UUID for every publish operation row; remove
  the terminal-state reset logic (no longer needed since each publish
  gets a fresh row)
- publish.rs: cancel_stale_batch_operations now identifies batch
  placeholders by empty song_ids instead of the publish-batch-* prefix
- upload_status.rs: mark_upload_status now looks up the most recent
  Publish operation by library+song_id instead of a fixed operation_id;
  removed the now-unused publish_operation_id function
- control_db.rs: added get_latest_publish_operation_for_song query

Parent17602c3

4 files changed
  • src-tauri/src/remote/control_db.rs+27−0
  • src-tauri/src/remote/mutation.rs+9−11
  • src-tauri/src/remote/sync/publish.rs+57−98
  • src-tauri/src/remote/sync/upload_status.rs+23−18