beaussan / update-time-on-edit-obsidian

MIT License
165 stars 15 forks source link

"Update Time on Edit" Causes Back-to-Back Syncing from Mobile to Desktop and Vice Versa. #78

Open HadesNinth opened 5 months ago

HadesNinth commented 5 months ago

I'm using Obsidian Sync. I have tested that this happens when the plugin is enabled on both Desktop and Mobile, not when the plugin is enabled only in either device.

For context, tags without quotations is the natural way Obsidian register tags (I think). This plugin just somehow applies quotations when it updates the frontmatter.

For some unexplainable reason, when this plugin is enabled, it adds quotations to tags in mobile, while removing quotations from tags on desktop. When files are synced to Windows, the plugin removes these quotations, then syncs the file back to iPhone. The iPhone then adds these quotations, and syncs the file back to Windows. Then Windows removes these quotations, syncs the file back to iPhone and then blah blah, so back and forth this cycle goes.

Here's the version history: Back and Forth

Here's it syncing back and forth in the change log. Fortunately, the plugin.json also updates, which allowed me to identify that this was the source of the syncing problem.

Back and Forth

This is especially a problem for large vaults. Because upon startup, Obsidian checks every file for changes. When it sees these changes, it immediately goes into a crazed syncing cycle of 10k notes back and 10k notes forth. Especially when you have Obsidian opens on both devices at the same time. Version history stacks up and up and up, taking precious space on the Cloud. It has happened to me quite a few times already before I discovered the problem today.

Worse yet, it also means that the "updated" time isn't accurate. Because it's just going to update every single note every time I open add a note on Mobile and it syncs to Desktop, and vice versa.