vrtmrz / obsidian-livesync

MIT License
4.69k stars 151 forks source link

Permanent "Working read storage process" appears when deleting files on Windows #425

Closed Jacksaur closed 4 months ago

Jacksaur commented 4 months ago

Abstract

When deleting files or folders on my Windows PC, I will permanently have a "Working Read Storage Process" icon in the status bar. The sync will never complete, even after hours. This also seems to randomly happen as I move files around too, which can also result in a permanent "Pending read storage process" icon appearing. This does not happen on my mobile device at all. Multiple deletions, or renames, will result in these pending processes piling up. Changing the content of a note seems to process absolutely fine. I have my sync method set as Periodic and On Events. Since Livesync was very buggy in my setup, perhaps because of this issue. This has caused duplication of files and folders on moves, and some lost notes entirely. Likely from when I was deleting the duplicated versions.

While testing, I found that renaming notes also triggers this behaviour.

Expected behaviour

Actually happened

Reproducing procedure

  1. Delete or rename file
  2. Replication will auto commence due to event
  3. Working read storage process will appear
  4. Icon will never disappear, replication will never fully complete.

Report materials

Report from the LiveSync

Report from hatch ``` ---- Obsidian info ---- Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) obsidian/1.5.12 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.23.6 remoteType: "" useCustomRequestHandler: false couchDB_URI: self-hosted(HTTP) 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: false passphrase: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 usePathObfuscation: false doNotDeleteFolder: false resolveConflictsByNewerFile: false batchSave: true deviceAndVaultName: "" usePluginSettings: false showOwnPlugins: false showStatusOnEditor: false showStatusOnStatusbar: true showOnlyIconsOnEditor: true usePluginSync: false autoSweepPlugins: false autoSweepPluginsPeriodic: false notifyPluginOrSettingUpdated: false checkIntegrityOnSave: false batch_size: 25 batches_limit: 25 useHistory: true disableRequestURI: true skipOlderFilesOnSync: true checkConflictOnlyOnOpen: false showMergeDialogOnlyOnActive: false syncInternalFiles: false syncInternalFilesBeforeReplication: false syncInternalFilesIgnorePatterns: \/node_modules\/, \/\.git\/, \/obsidian-livesync\/ syncInternalFilesInterval: 0 additionalSuffixOfDatabaseName: ec77c75d13a1fff6 ignoreVersionCheck: false lastReadUpdates: 23 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: false pluginSyncExtendedSetting: {} syncMaxSizeInMB: 50 settingSyncFile: "" writeCredentialsForSettingSync: false notifyAllSettingSyncFile: false isConfigured: true settingVersion: 0 enableCompression: false accessKey: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 bucket: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷(0 letters) endpoint: Not configured or AWS region: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷(4 letters) secretKey: 𝑅𝐸𝐷𝐴𝐢𝑇𝐸𝐷 useEden: false maxChunksInEden: 10 maxTotalLengthInEden: 1024 maxAgeInEden: 10 disableCheckingConfigMismatch: false ```

Plug-in log

Plug-in log Log is taken from me deleting a note, resulting in the permanent icon. It seems to notice the change, but never logs a "Done" for it. ``` 09/05/2024, 18:44:52->Cache initialized 300 / 250000000000 09/05/2024, 18:44:52->loading plugin 09/05/2024, 18:44:52->Self-hosted LiveSync v0.23.6 0.23.6 09/05/2024, 18:44:52->xxhash for plugin initialised 09/05/2024, 18:44:52->Waiting for ready... 09/05/2024, 18:44:52->Opening Database... 09/05/2024, 18:44:52->Database is now ready. 09/05/2024, 18:44:52->Initialize and checking database files 09/05/2024, 18:44:52->Checking deleted files 09/05/2024, 18:44:52->Collecting local files on the DB: 25 09/05/2024, 18:44:52->Collecting local files on the DB: 50 09/05/2024, 18:44:52->Collecting local files on the DB: 75 09/05/2024, 18:44:52->Collecting local files on the DB: 100 09/05/2024, 18:44:52->Collecting local files on the DB: 125 09/05/2024, 18:44:52->Collecting local files on the DB: 150 09/05/2024, 18:44:52->Collecting local files on the DB: 175 09/05/2024, 18:44:52->Updating database by new files 09/05/2024, 18:44:52->UPDATE DATABASE: Nothing to do 09/05/2024, 18:44:52->UPDATE STORAGE 09/05/2024, 18:44:52->UPDATE STORAGE: DONE:10, FAILED:0, LAST:53 09/05/2024, 18:44:52->UPDATE STORAGE All done: DONE:73, FAILED:0 09/05/2024, 18:44:55->Initialized, NOW TRACKING! 09/05/2024, 18:44:55->Scanning customizations... 09/05/2024, 18:44:55->Scanning customizing files. 09/05/2024, 18:44:55->Scanning customizations : done 09/05/2024, 18:44:55->OneShot Sync begin... (sync) 09/05/2024, 18:44:55->Replication activated 09/05/2024, 18:44:55->Replication completed 09/05/2024, 18:44:57->OneShot Sync begin... (sync) 09/05/2024, 18:44:57->Chunks saved: doc: Tyrant/CONFIG/workspace.json.md ,chunks: 5 (new:2, recycled:1, cached:2) 09/05/2024, 18:44:57->STORAGE --> DB:ix:Tyrant/CONFIG/workspace.json.md: (config) Done 09/05/2024, 18:44:57->Replication activated 09/05/2024, 18:44:58->Replication completed 09/05/2024, 18:44:59->OneShot Sync begin... (sync) 09/05/2024, 18:44:59->Chunks saved: doc: Tyrant/CONFIG/workspace.json.md ,chunks: 5 (new:2, recycled:0, cached:3) 09/05/2024, 18:44:59->STORAGE --> DB:ix:Tyrant/CONFIG/workspace.json.md: (config) Done 09/05/2024, 18:44:59->Replication activated 09/05/2024, 18:44:59->Replication completed 09/05/2024, 18:45:00->Entry removed:01 Tasks/Todo.md (01 Tasks-24-b1e0f6aef2f746f18c52e62877a5a5ab) 09/05/2024, 18:45:00->Chunks saved: doc: Tyrant/CONFIG/workspace.json.md ,chunks: 5 (new:3, recycled:0, cached:2) 09/05/2024, 18:45:00->STORAGE --> DB:ix:Tyrant/CONFIG/workspace.json.md: (config) Done 09/05/2024, 18:45:06->Chunks saved: doc: Tyrant/CONFIG/workspace.json.md ,chunks: 5 (new:2, recycled:0, cached:3) 09/05/2024, 18:45:06->STORAGE --> DB:ix:Tyrant/CONFIG/workspace.json.md: (config) Done 09/05/2024, 18:45:46->Log window opened 09/05/2024, 18:45:52->Chunks saved: doc: Tyrant/CONFIG/workspace.json.md ,chunks: 5 (new:3, recycled:0, cached:2) 09/05/2024, 18:45:52->STORAGE --> DB:ix:Tyrant/CONFIG/workspace.json.md: (config) Done ```
lukaszstr commented 4 months ago

Observed the same on macos

vrtmrz commented 4 months ago

Sorry for being late! I will address this issue on #399, Please move there.