vrtmrz / obsidian-livesync

MIT License
4.7k stars 151 forks source link

Renaming or deleting notes cause sync to be stuck, showing ⏳ Working read storage processes and/or πŸ›« Pending read storage processes #399

Closed jluo98 closed 4 months ago

jluo98 commented 6 months ago

Thanks for your hard work on this community plugin!

Abstract

Renaming operations are stuck. Status displays ⏳1. Synchronization would only complete when I restart Obsidian.

Expected behaviour

Actually happened

Reproducing procedure

  1. Create a new note Untitled on primary device
  2. Rename the note to New Test File
  3. Status shows ⏳ 1
  4. Replicate on a secondary device
  5. Only Untitled shows up
  6. Restart Obsidian on primary device
  7. ⏳ disappears, New Test File shows up on secondary device after replication

Report materials

If the information is not available, do not hesitate to report it as it is. You can also of course omit it if you think this is indeed unnecessary. If it is necessary, I will ask you.

Report from the LiveSync

For more information, please refer to Making the report.

Report from hatch ``` ---- Obsidian info ---- Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) obsidian/1.5.11 Chrome/120.0.6099.283 Electron/28.2.3 Safari/537.36 ---- remote config ---- cluster: n: "1" cors: credentials: "true" origins: app://obsidian.md,capacitor://localhost,http://localhost chttpd: bind_address: 0.0.0.0 enable_cors: "true" max_http_request_size: "4294967296" port: "5984" require_valid_user: "true" admins: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 vendor: name: The Apache Software Foundation feature_flags: partitioned||*: "true" chttpd_auth: hash_algorithms: sha256, sha require_valid_user: "true" indexers: couch_mrview: "true" prometheus: additional_port: "false" bind_address: 127.0.0.1 port: "17986" httpd: WWW-Authenticate: Basic realm="couchdb" bind_address: 127.0.0.1 enable_cors: "true" port: "5986" smoosh: state_dir: ./data couch_httpd_auth: authentication_db: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 secret: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 authentication_redirect: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 couchdb_engines: couch: couch_bt_engine couchdb: database_dir: ./data max_document_size: "50000000" uuid: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 view_index_dir: ./data ---- Plug-in config --- version:0.22.16 couchDB_URI: self-hosted(HTTPS) couchDB_USER: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 couchDB_PASSWORD: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 couchDB_DBNAME: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 liveSync: false syncOnSave: true syncOnStart: true savingDelay: 200 lessInformationInLog: false gcDelay: 0 versionUpFlash: "" minimumChunkSize: 20 longLineThreshold: 250 showVerboseLog: false suspendFileWatching: false trashInsteadDelete: true periodicReplication: true periodicReplicationInterval: 60 syncOnFileOpen: true encrypt: true passphrase: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 usePathObfuscation: true doNotDeleteFolder: false resolveConflictsByNewerFile: false batchSave: true deviceAndVaultName: "" usePluginSettings: false showOwnPlugins: false showStatusOnEditor: false showStatusOnStatusbar: true showOnlyIconsOnEditor: false usePluginSync: false autoSweepPlugins: false autoSweepPluginsPeriodic: false notifyPluginOrSettingUpdated: false checkIntegrityOnSave: false batch_size: 50 batches_limit: 40 useHistory: true disableRequestURI: true skipOlderFilesOnSync: true checkConflictOnlyOnOpen: false showMergeDialogOnlyOnActive: false syncInternalFiles: false syncInternalFilesBeforeReplication: false syncInternalFilesIgnorePatterns: \/node_modules\/, \/\.git\/, \/obsidian-livesync\/,\/workspace$ ,\/workspace.json$,\/workspace-mobile.json$ syncInternalFilesInterval: 60 additionalSuffixOfDatabaseName: 50c8117af5fe0fe7 ignoreVersionCheck: false lastReadUpdates: 22 deleteMetadataOfDeletedFiles: false syncIgnoreRegEx: "" syncOnlyRegEx: "" customChunkSize: 50 readChunksOnline: true watchInternalFileChanges: true automaticallyDeleteMetadataOfDeletedFiles: 0 disableMarkdownAutoMerge: false writeDocumentsIfConflicted: false useDynamicIterationCount: false syncAfterMerge: true configPassphraseStore: "" encryptedPassphrase: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 encryptedCouchDBConnection: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 permitEmptyPassphrase: false useIndexedDBAdapter: true useTimeouts: false writeLogToTheFile: false doNotPaceReplication: false hashCacheMaxCount: 300 hashCacheMaxAmount: 50 concurrencyOfReadChunksOnline: 30 minimumIntervalOfReadChunksOnline: 25 hashAlg: xxhash64 suspendParseReplicationResult: false doNotSuspendOnFetching: false useIgnoreFiles: false ignoreFiles: .gitignore syncOnEditorSave: true pluginSyncExtendedSetting: {} syncMaxSizeInMB: 50 settingSyncFile: "" writeCredentialsForSettingSync: false notifyAllSettingSyncFile: false isConfigured: true settingVersion: 0 ```

Obsidian debug info

Debug info ``` SYSTEM INFO: Obsidian version: v1.5.12 Installer version: v1.5.11 Operating system: Darwin Kernel Version 23.4.0: Wed Feb 21 21:44:43 PST 2024; root:xnu-10063.101.15~2/RELEASE_ARM64_T6000 23.4.0 Login status: not logged in Insider build toggle: off Live preview: on Base theme: adapt to system Community theme: none Snippets enabled: 0 Restricted mode: off Plugins installed: 2 Plugins enabled: 2 1: Self-hosted LiveSync v0.22.16 2: Enhancing Export v1.10.4 RECOMMENDATIONS: Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins. ```

Plug-in log

We can see the log by tapping the Document box icon. If you noticed something suspicious, please let me know. Note: Please enable Verbose Log. For detail, refer to Logging, please.

Plug-in log ``` 4/1/2024, 1:06:06 PM->Cache initialized 300 / 250000000000 4/1/2024, 1:06:06 PM->loading plugin 4/1/2024, 1:06:06 PM->Self-hosted LiveSync v0.22.16 0.22.16 4/1/2024, 1:06:06 PM->xxhash for plugin initialised 4/1/2024, 1:06:06 PM->Waiting for ready... 4/1/2024, 1:06:06 PM->Opening Database... 4/1/2024, 1:06:06 PM->Database is now ready. 4/1/2024, 1:06:06 PM->Log window opened 4/1/2024, 1:06:06 PM->Initialize and checking database files 4/1/2024, 1:06:06 PM->Checking deleted files 4/1/2024, 1:06:06 PM->Collecting local files on the DB: 25 4/1/2024, 1:06:06 PM->Collecting local files on the DB: 50 4/1/2024, 1:06:06 PM->Collecting local files on the DB: 75 4/1/2024, 1:06:06 PM->Collecting local files on the DB: 100 4/1/2024, 1:06:06 PM->Collecting local files on the DB: 125 4/1/2024, 1:06:06 PM->Collecting local files on the DB: 150 4/1/2024, 1:06:06 PM->Collecting local files on the DB: 175 4/1/2024, 1:06:06 PM->Updating database by new files 4/1/2024, 1:06:06 PM->UPDATE DATABASE: Nothing to do 4/1/2024, 1:06:06 PM->UPDATE STORAGE 4/1/2024, 1:06:06 PM->UPDATE STORAGE All done: DONE:8, FAILED:0 4/1/2024, 1:06:06 PM->Initialized, NOW TRACKING! 4/1/2024, 1:06:06 PM->OneShot Sync begin... (sync) 4/1/2024, 1:06:06 PM->Replication activated 4/1/2024, 1:06:07 PM->Replication completed 4/1/2024, 1:06:18 PM->Chunks saved: doc: Untitled.md ,chunks: 1 (new:0, recycled:1, cached:0) 4/1/2024, 1:06:18 PM->STORAGE -> DB (plain) Untitled.md 4/1/2024, 1:06:18 PM->OneShot Sync begin... (sync) 4/1/2024, 1:06:19 PM->Replication activated 4/1/2024, 1:06:19 PM->Replication is already in progress. 4/1/2024, 1:06:19 PM->Replication completed 4/1/2024, 1:06:24 PM->OneShot Sync begin... (sync) 4/1/2024, 1:06:24 PM->Replication completed 4/1/2024, 1:06:24 PM->Entry removed:Untitled.md (f:f848af-13-1fe925855449427eb5fc8854547ebb4c) 4/1/2024, 1:06:24 PM->STORAGE -> DB (plain) New Test File.md ```

Other information, insights and intuition.

Please provide any additional context or information about the problem.

jluo98 commented 6 months ago

Same behavior happens when deleting a note.

Reproducing procedure

  1. Delete any note on primary device
  2. Status shows ⏳ 1
  3. Replicate on a secondary device, the deleted note is still there
  4. Restart Obsidian on primary device
  5. The note is now deleted, replication on secondary device deletes the note too
Plug-in log ``` 4/2/2024, 12:50:43 AM->Cache initialized 300 / 250000000000 4/2/2024, 12:50:43 AM->loading plugin 4/2/2024, 12:50:43 AM->Self-hosted LiveSync v0.22.16 0.22.16 4/2/2024, 12:50:43 AM->xxhash for plugin initialised 4/2/2024, 12:50:43 AM->Waiting for ready... 4/2/2024, 12:50:43 AM->Opening Database... 4/2/2024, 12:50:43 AM->Database is now ready. 4/2/2024, 12:50:43 AM->Log window opened 4/2/2024, 12:50:43 AM->Initialize and checking database files 4/2/2024, 12:50:43 AM->Checking deleted files 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 25 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 50 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 75 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 100 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 125 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 150 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 175 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 200 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 225 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 250 4/2/2024, 12:50:43 AM->Collecting local files on the DB: 275 4/2/2024, 12:50:43 AM->Updating database by new files 4/2/2024, 12:50:43 AM->UPDATE DATABASE: Nothing to do 4/2/2024, 12:50:43 AM->UPDATE STORAGE 4/2/2024, 12:50:43 AM->UPDATE STORAGE: DONE:10, FAILED:0, LAST:6 4/2/2024, 12:50:43 AM->UPDATE STORAGE: DONE:20, FAILED:0, LAST:0 4/2/2024, 12:50:43 AM->UPDATE STORAGE All done: DONE:25, FAILED:0 4/2/2024, 12:50:43 AM->Initialized, NOW TRACKING! 4/2/2024, 12:50:43 AM->OneShot Sync begin... (sync) 4/2/2024, 12:50:43 AM->Replication completed 4/2/2024, 12:50:46 AM->OneShot Sync begin... (sync) 4/2/2024, 12:50:46 AM->Replication completed 4/2/2024, 12:50:49 AM->OneShot Sync begin... (sync) 4/2/2024, 12:50:49 AM->Replication completed 4/2/2024, 12:50:56 AM->Entry removed:Test 5.md (f:816647-2-7a84aa2c9cc642d28d8bbc12d3a520ec) 4/2/2024, 12:50:56 AM->Entry removed:Test 4.md (f:95e405-2-8c8dbf2fbe8c4fdca9fcc4013789d834) 4/2/2024, 12:50:56 AM->Entry removed:Test 1.md (f:13da69-2-3564facfc1b54432a0cf498f837db8be) 4/2/2024, 12:50:56 AM->Entry removed:Test 3.md (f:acb034-2-e9727b45b759418ea5c15cfa4f9f8156) 4/2/2024, 12:50:56 AM->Entry removed:Test 2.md (f:2090a9-2-1bd12ede6f35418fbf4a52787266dc75) ```
jluo98 commented 6 months ago

Also, it seems that the plug-in cannot handle deleting more than 5 notes.

Reproducing procedure

  1. Delete 10 notes on primary device
  2. Status shows ⏳ 5 πŸ›« 5
  3. Replicate on a secondary device, the deleted notes are still there
  4. Restart Obsidian on primary device
  5. Only 5 notes are actually deleted, the other 5 are restored from server
Plug-in log (Deleting) ``` 4/2/2024, 1:00:36 AM->Cache initialized 300 / 250000000000 4/2/2024, 1:00:36 AM->loading plugin 4/2/2024, 1:00:36 AM->Self-hosted LiveSync v0.22.16 0.22.16 4/2/2024, 1:00:36 AM->xxhash for plugin initialised 4/2/2024, 1:00:36 AM->Waiting for ready... 4/2/2024, 1:00:36 AM->Cache initialized 10 / 1000000000 4/2/2024, 1:00:36 AM->Cache initialized 300 / 50000000 4/2/2024, 1:00:36 AM->Newer xxhash has been initialised 4/2/2024, 1:00:36 AM->Opening Database... 4/2/2024, 1:00:36 AM->Database info 4/2/2024, 1:00:36 AM->{ "doc_count": 493, "update_seq": 602, "db_name": "Obsidian-50c8117af5fe0fe7-livesync-v2-indexeddb", "auto_compaction": false, "adapter": "indexeddb" } 4/2/2024, 1:00:36 AM->Database is now ready. 4/2/2024, 1:00:36 AM->Log window opened 4/2/2024, 1:00:36 AM->Initialize and checking database files 4/2/2024, 1:00:36 AM->Checking deleted files 4/2/2024, 1:00:36 AM->Collecting local files on the storage 4/2/2024, 1:00:36 AM->Collecting local files on the DB 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 25 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 50 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 75 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 100 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 125 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 150 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 175 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 200 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 225 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 250 4/2/2024, 1:00:36 AM->Collecting local files on the DB: 275 4/2/2024, 1:00:36 AM->Opening the key-value database 4/2/2024, 1:00:36 AM->Updating database by new files 4/2/2024, 1:00:36 AM->UPDATE DATABASE: Nothing to do 4/2/2024, 1:00:36 AM->UPDATE STORAGE 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->UPDATE STORAGE: DONE:10, FAILED:0, LAST:16 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->UPDATE STORAGE: DONE:20, FAILED:0, LAST:6 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->UPDATE STORAGE: DONE:30, FAILED:0, LAST:0 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:00:36 AM->UPDATE STORAGE All done: DONE:35, FAILED:0 4/2/2024, 1:00:36 AM->Initialized, NOW TRACKING! 4/2/2024, 1:00:36 AM->Cache initialized 300 / 50000000 4/2/2024, 1:00:36 AM->Modifying callback of the save command 4/2/2024, 1:00:36 AM->Additional safety scan.. 4/2/2024, 1:00:36 AM->OneShot Sync begin... (sync) 4/2/2024, 1:00:36 AM->STORAGE -> DB :Test 10.md 4/2/2024, 1:00:36 AM->Chunks saved: doc: Test 10.md ,chunks: 1 (new:0, recycled:1, cached:0) 4/2/2024, 1:00:36 AM->STORAGE -> DB (plain) Test 10.md 4/2/2024, 1:00:36 AM->There are no conflicted files 4/2/2024, 1:00:36 AM->Additional safety scan done 4/2/2024, 1:00:36 AM->Replication activated 4/2/2024, 1:00:36 AM->Replication is already in progress. 4/2/2024, 1:00:36 AM->Replication paused 4/2/2024, 1:00:36 AM->Replication completed 4/2/2024, 1:00:47 AM->Entry removed:Test 10.md (f:eac0e2-4-eda98e5a31514c7c90aebf0718a9648f) 4/2/2024, 1:00:47 AM->Entry removed:Test 1.md (f:13da69-6-bca69fe579d7467492b0dae6aa2cdf8c) 4/2/2024, 1:00:47 AM->Entry removed:Test 9.md (f:654a0b-4-89333d38272f406fa76df5d0b2c3314c) 4/2/2024, 1:00:47 AM->Entry removed:Test 2.md (f:2090a9-6-39608f35c9994ba2a3468694d893c68f) 4/2/2024, 1:00:47 AM->Entry removed:Test 4.md (f:95e405-6-87d325fb22724adbbf2174d21f9f0fe9) ```
Plug-in log (After restart) ``` 4/2/2024, 1:04:05 AM->Cache initialized 300 / 250000000000 4/2/2024, 1:04:05 AM->loading plugin 4/2/2024, 1:04:05 AM->Self-hosted LiveSync v0.22.16 0.22.16 4/2/2024, 1:04:05 AM->xxhash for plugin initialised 4/2/2024, 1:04:05 AM->Waiting for ready... 4/2/2024, 1:04:05 AM->Cache initialized 10 / 1000000000 4/2/2024, 1:04:05 AM->Cache initialized 300 / 50000000 4/2/2024, 1:04:05 AM->Newer xxhash has been initialised 4/2/2024, 1:04:05 AM->Opening Database... 4/2/2024, 1:04:05 AM->Database info 4/2/2024, 1:04:05 AM->{ "doc_count": 493, "update_seq": 608, "db_name": "Obsidian-50c8117af5fe0fe7-livesync-v2-indexeddb", "auto_compaction": false, "adapter": "indexeddb" } 4/2/2024, 1:04:05 AM->Database is now ready. 4/2/2024, 1:04:05 AM->Log window opened 4/2/2024, 1:04:05 AM->Initialize and checking database files 4/2/2024, 1:04:05 AM->Checking deleted files 4/2/2024, 1:04:05 AM->Collecting local files on the storage 4/2/2024, 1:04:05 AM->Collecting local files on the DB 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 25 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 50 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 75 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 100 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 125 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 150 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 175 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 200 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 225 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 250 4/2/2024, 1:04:05 AM->Collecting local files on the DB: 275 4/2/2024, 1:04:05 AM->Opening the key-value database 4/2/2024, 1:04:05 AM->Updating database by new files 4/2/2024, 1:04:05 AM->UPDATE DATABASE: Nothing to do 4/2/2024, 1:04:05 AM->UPDATE STORAGE 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->UPDATE STORAGE: DONE:10, FAILED:0, LAST:27 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->UPDATE STORAGE: DONE:20, FAILED:0, LAST:16 4/2/2024, 1:04:05 AM->STORAGE <- DB (create,plain) Test 6.md 4/2/2024, 1:04:05 AM->Check or pull from db:Test 6.md OK 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->STORAGE <- DB (create,plain) Test 5.md 4/2/2024, 1:04:05 AM->Check or pull from db:Test 5.md OK 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->UPDATE STORAGE: DONE:30, FAILED:0, LAST:6 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->STORAGE <- DB (create,plain) Test 3.md 4/2/2024, 1:04:05 AM->Check or pull from db:Test 3.md OK 4/2/2024, 1:04:05 AM->UPDATE STORAGE: DONE:40, FAILED:0, LAST:0 4/2/2024, 1:04:05 AM->STORAGE <- DB (create,plain) Test 8.md 4/2/2024, 1:04:05 AM->Check or pull from db:Test 8.md OK 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->Deletion history skipped: (name redacted).md 4/2/2024, 1:04:05 AM->STORAGE <- DB (create,plain) Test 7.md 4/2/2024, 1:04:05 AM->Check or pull from db:Test 7.md OK 4/2/2024, 1:04:05 AM->UPDATE STORAGE All done: DONE:45, FAILED:0 4/2/2024, 1:04:05 AM->Initialized, NOW TRACKING! 4/2/2024, 1:04:05 AM->Cache initialized 300 / 50000000 4/2/2024, 1:04:05 AM->Modifying callback of the save command 4/2/2024, 1:04:05 AM->Additional safety scan.. 4/2/2024, 1:04:05 AM->OneShot Sync begin... (sync) 4/2/2024, 1:04:05 AM->There are no conflicted files 4/2/2024, 1:04:05 AM->Additional safety scan done 4/2/2024, 1:04:05 AM->Replication activated 4/2/2024, 1:04:05 AM->Processing (name redacted).md (f:375691: 3-611) :Started... 4/2/2024, 1:04:05 AM->Processing (name redacted).md (f:bd4fa8: 3-d63) :Started... 4/2/2024, 1:04:05 AM->delete skipped: (name redacted).md :Already not exist on storage 4/2/2024, 1:04:05 AM->Processing (name redacted).md (f:375691 :3-611) : Done 4/2/2024, 1:04:05 AM->delete skipped: (name redacted).md :Already not exist on storage 4/2/2024, 1:04:05 AM->Processing (name redacted).md (f:bd4fa8 :3-d63) : Done 4/2/2024, 1:04:05 AM->Processing (name redacted).md (f:5e5f8e: 3-090) :Started... 4/2/2024, 1:04:05 AM->Processing (name redacted).md (f:7fee50: 3-998) :Started... 4/2/2024, 1:04:05 AM->delete skipped: (name redacted).md :Already not exist on storage 4/2/2024, 1:04:05 AM->Processing (name redacted).md (f:5e5f8e :3-090) : Done 4/2/2024, 1:04:05 AM->Processing (name redacted) (f:db6128: 3-250) :Started... 4/2/2024, 1:04:05 AM->delete skipped: (name redacted).md :Already not exist on storage 4/2/2024, 1:04:05 AM->Processing (name redacted).md (f:7fee50 :3-998) : Done 4/2/2024, 1:04:05 AM->delete skipped: (name redacted) :Already not exist on storage 4/2/2024, 1:04:05 AM->Processing (name redacted) (f:db6128 :3-250) : Done 4/2/2024, 1:04:05 AM->Replication paused 4/2/2024, 1:04:05 AM->Replication completed ```
schemen commented 5 months ago

I don't have this issue on my Linux client, however I observe the same under windows and ios client. It looks like the plugin has trouble handling New, renamed or deleted files, anything relating to some file handling.

Restarting the client for a clean new sync solves the problem. This looks related to #317 - possibly similar at least.

vrtmrz commented 5 months ago

Sorry for being delayed! Indeed, while the hourglass icon is displayed, no changes to the file have been applied to the database. This is designed behaviour. The icon indicates that the file is being loaded.

However, the real problem is that this icon does not disappear. Taking into account that it works fine after a restart, it could be deadlocked or the queued process has got stuck.

I have not reproduced it yet, but I will address it soon. Sorry for the inconvenience and thank you for your patience and cooperation!

JScharloo commented 5 months ago

I can confirm this issue. When editing a note, the changes get replicated across my devices. As soon as a new folder or note is created, renamed or deleted the changes do not get replicated. In fact, all replication from/to that device then suspends until the application is restarted. The hourglass status symbol is presented.

This behavior is seen on Android, Windows and Linux clients alike. All with fresh databases and configurations (everything from scratch). Frustratingly, the logs do not indicate anything to be wrong or off. All messages reflect correct functioning. Even verifying the files using 'Verify All' in the settings menu results does not fix the issue, it even completes without problem.

Actually this issue drove me completely nuts for a couple of days. New to Obsidian and LiveSync, I thought that there was a problem in my new setup. I actually thing I came across another bug (need to replicate first before posting) where the copied setup URI gave a different database suffix. After a couple of resets, wipes, swears and redo's I finally got Obsidian with your plugin to work. Until it didn't again. I have since figured out that the issue posted here is the curlpit. File handling hangs the replication.

Interestingly, when the device that had a change in files restarts the application, the change is replicated nearly live to the other clients, except for the Android client. There the 'receiving' application needs to be restarted as well in my tests.

Potentially interestingly, just like OP, I have LiveSync set to false in my settings and am using 'Periodic and On events' mode. Perhaps there is a clue there. However I just tried switching my clients to LiveSync mode but unfortunately the issue persists.

Let me know how I can provide detailed debugging information. Thanks for your time and effort in making and maintaining this plugin!

schemen commented 5 months ago

Latest release sadly does not seem to be working in this case, I still have the waiting symbol. Here are a few logs:

11.4.2024, 22:45:03->Entry removed:02 Private Notes/General/test-rename4.md (02 Priva-2-25243faaeb62438ab52761dcce7adba1)
11.4.2024, 22:45:03->Chunks saved: doc: 02 Private Notes/General/test-rename5.md ,chunks: 1 (new:1, recycled:0, cached:0)
11.4.2024, 22:45:03->STORAGE -> DB (plain) 02 Private Notes/General/test-rename5.md

A restart still fixes it. Though, the logs don't show anything happening upon restart.

vrtmrz commented 4 months ago

Thank you for your patience! I think that this has been fixed in v0.23.7 or v0.23.8. (And, it will be more stable in v0.23.9).

And, I am sorry for lacking replies. Would you mind if I ask you to check the behaviour in the recent version?

schemen commented 4 months ago

Hi @vrtmrz

I can confirm with version 0.23.10 the issue remains. Renaming, new creation, deletion all don't seem to sync. When restarting the client where the action happened, it does get propagated to the other clients.

Normal writing operations work just fine, it really just seems file operations are wonky.

vrtmrz commented 4 months ago

Thank you for confirmation! And finally, I have reproduced this! This was the issue around the Sync On Save option. This will be fixed at v0.23.11 and will be released soon. Thank you for your deep patience!

schemen commented 4 months ago

Ah indeed, once I disabled Sync On Save and Sync on Editor Save (That one not 100% sure) my syncs are working again!

Jacksaur commented 4 months ago

Can confirm disabling Sync on Save has solved the issue on my end too.

schemen commented 4 months ago

With 0.23.11 I can definitely say this bug is not around anymore. I can use Sync on Save again.

Thank you @vrtmrz !

jluo98 commented 4 months ago

This has indeed been resolved. Thank you for working on it, @vrtmrz !