Skip to content

Settings sync merge conflict #73

@Zweikeks

Description

@Zweikeks

Hello kh4f,

I am using Obsidian Sync. I've noticed a lot of sync issues between two devices.
Even if I

  • work only on one device at a time.
  • close Obsidian on the other device.

An example:

The initial state is the directory TEST1 with only one file, A.md, in it. This has been successfully synced between PC1 and PC2. PC1, PC2 and the vault are fully synced. data.json is identical on PC1 and PC2.

Working on PC1
Obsidian on PC2 is closed
Add B.md to TEST1, it is added to the top
Change the sort order to have A.md above B.md
Wait for syncing to push data.json into the vault
Close Obsidian

Working on PC2
Obsidian on PC1 is closed
Start Obsidian
B.md is coming in from the vault
The sort order is lost, B.md is above A.md

This is only an example. There are more issues because of the nature of the Obsidian environment, various sync services, different states, related stuff (files and their order) syncing separetly, the Obsidian API not exposing sync events directly...

Possible solutions:

  • Perhaps a locking mechanism will do. Possibly also something that is set statically by the user.
    Sorting is only allowed after the user explicitely switches it on. So it is off by default and maybe
    turns off on mobile when the app is idle. Something like that.
  • I have tried to evaluate this.app.internalPlugins.plugins.sync.instance.syncStatus. However, I
    found the behavior not suitable.
  • That's why I implemented something myself that attempts to detect the sync status (sync active/sync idle)
    and provides a method for waiting asynchronously for the sync idle status. Take a look here:
    https://github.com/Zweikeks/sync-monitor
    Please try it out. It is a complete plugin that can be installed and tested right away. Perhaps you
    see a way how you can use the code to make Manual Sorting more robust.
  • Perhaps someone else has a good idea. Or a link to another plugin that solves this somehow.

Environment:

Manual Sorting v2.5.0
Obsidian v1.9.14 on two PCs
Obsidian Sync

Best Regards,
Zweikeks

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions