Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: only update daily notes on the one computer that is currently seeing activity, to avoid backend sync issues #43

Closed
thomasvs opened this issue Jun 15, 2022 · 7 comments
Labels
question Further information is requested

Comments

@thomasvs
Copy link

Enabling this plugin on multiple computers that I sync with SyncThing, I notice it ends up creating a lot of conflicts. My guess is that's because the plugin is running on multiple computers, making changes to the daily notes on each of them independently, and making conflict resolution hard/impossible for the underlying sync mechanism.

I saw another issue that seemed similar on iCloud.

I think one way the issue can be avoided is for the plugin to be aware of the Obsidian process being actively used or not in some way, so that only one copy at any point is getting updates.

I don't know if obsidian exposes a useful signal of activity?

@franciskafieh
Copy link
Owner

franciskafieh commented Jun 15, 2022

I notice it ends up creating a lot of conflicts

could you elaborate a little? what are the conflicts? how/when exactly do they happen? could help me understand better :)

I think one way the issue can be avoided is for the plugin to be aware of the Obsidian process being actively used or not [...] so that only one copy at any point is getting updates

if you mean what i think you mean, this is not possible... all i can do is manipulate a file on your local computer the plugin is installed on

@franciskafieh franciskafieh added the question Further information is requested label Jun 15, 2022
@thomasvs
Copy link
Author

syncthing synchronizes in the background and is typically able to merge conflicts automatically.

Most conflicts are in the list of recently edited files at the bottom updated by this plugin, and they are conflicts for the daily log itself. So my theory is that the plugin is active on multiple computers, which then triggers creating a conflict file, and that conflict file then gets added to the daily log on either computer, causing a few repeats until one sync does automatically merge, at which the chain stops.

@franciskafieh
Copy link
Owner

franciskafieh commented Jun 17, 2022

do the conflict files follow a certain naming convention? i could add a feature to ignore files that match a certain regex pattern

edit: googled it and it seems to be <filename>.sync-conflict-<date>-<time>-<modifiedBy>.<ext>

would love if you could confirm though :)

@franciskafieh
Copy link
Owner

If yes, I could make this a setting. just gotta create new RegExp()s for each in the list and check the file name before appending :)

@franciskafieh
Copy link
Owner

@thomasvs can you please give me an update on this?

@franciskafieh
Copy link
Owner

Closed due to inactivity

@franciskafieh franciskafieh closed this as not planned Won't fix, can't repro, duplicate, stale Aug 10, 2022
@Triquetra
Copy link

I don't have any conflict files right now to compare it to, but the regex you propose looks correct to me. That may reduce issues with use on multiple computers when using SyncThing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants