Skip to content

A sync write during a save shows a false 'could not save' Notice #481

Open

Description

@chhoumann

When a sync client writes data.json in the short window between Obsidian's writeFile and its utimes during a PodNotes save, PodNotes shows "PodNotes could not save your changes." even though nothing was lost.

Seen in: the SYNC1 (#480) and V-480 stress loops, under heavy CPU load: 17 in 300 runs (SYNC1), 4 in 100 on the fix and 5 in 100 on master (V-480). Every affected run recovered, and since #480 the synced library is adopted at once. The rate under stress doesn't estimate how often real users see it, but it's reachable in a real sync collision.

Cause: PERS3's readback check reads data.json after the save. If another writer replaced it in between, the readback doesn't match and the writer reports a failed save.

Expected: when the readback differs because a newer external version arrived (one the merge would adopt), treat it as an external change, not a failed save, and show no failure Notice. Keep the Notice for real write failures.

Also from V-480, low priority:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions