### What happened? Steps to reproduce: 1. Create a fakefs folder with path `test?files=20` on device A 2. Create a fakefs folder with the same ID and with path `test?content=true` on device B 3. Share the fakefs folder with device B 4. Wait for device B to get in sync 5. On device A, unshare the folder with device B 6. Reshare the folder with device B Expected behavior: Device B shows as up to date on device A, as device B already has all the files it needs. Actual behavior: Device B's status is "syncing" endlessly (or until you restart device A with `--debug-reset-delta-idxs`) on device A. <img width="563" height="498" alt="Image" src="https://github.com/user-attachments/assets/198589c2-fb48-487c-b6f7-41c9ed6828ea" /> ### Syncthing version v2.0.11 ### Platform & operating system Linux amd64 ### Browser version _No response_ ### Relevant log output ```shell 2025-11-22 07:59:08 DBG model@0xc0000fa000 Completion(BPFTEVI-CGXXZQL-FFK2XVO-VJ6JNXX-34RIM77-MXMQNV3-EIMMGM4-YE5QSQZ, "test"): map[completion:0 globalBytes:22767766 globalItems:59 needBytes:22767766 needDeletes:0 needItems:59 remoteState:valid sequence:118] (log.pkg=model log.src.file=model.go log.src.line=947) 2025-11-22 07:59:08 DBG model@0xc0000fa000 Completion(BPFTEVI-CGXXZQL-FFK2XVO-VJ6JNXX-34RIM77-MXMQNV3-EIMMGM4-YE5QSQZ, "test"): map[completion:0 globalBytes:22767766 globalItems:59 needBytes:22767766 needDeletes:0 needItems:59 remoteState:valid sequence:118] (log.pkg=model log.src.file=model.go log.src.line=947) 2025-11-22 07:59:09 DBG model@0xc0000fa000 Completion(BPFTEVI-CGXXZQL-FFK2XVO-VJ6JNXX-34RIM77-MXMQNV3-EIMMGM4-YE5QSQZ, "test"): map[completion:0 globalBytes:22767766 globalItems:59 needBytes:22767766 needDeletes:0 needItems:59 remoteState:valid sequence:118] (log.pkg=model log.src.file=model.go log.src.line=947) ```
Activity
marbens-arch commentedon Nov 29, 2025
Looks like this is caused by
DropAllFilesnot resetting the index ID.[-]Device "needs" items it already has after resharing folder[/-][+]Index IDs persist after unsharing folder[/+]fix(db): drop index IDs when dropping all files (fixes syncthing#10469)
fix(db): drop index IDs when dropping all files (fixes syncthing#10469)
chore(db, model): separate methods to drop a device vs its files (#10480