I’ve been hitting this issue a bunch, and I think the repro process is:
- create a bunch of files
- sync the index with a remote node, but disconnect before syncing the files (so that the remote node knows “these files should exist” but it doesn’t have a copy of them)
- add the files to .stignore on the local node
- delete the files locally (which doesn’t update the index because they’re ignored?)
- now your network collectively has the information “these files should exist” but they don’t exist on any of the nodes
- optionally remove the local .stignore file if you want the local node to report out-of-sync as well as the remote nodes
REST info for one of these files which is marked “local node created this file” in the index and “local node does not have this file” in reality.
I’ve tried marking these files as (?d) in the ignore file and then deleting their parent directory; and I’ve tried marking the local repo as send-only and then pressing “override changes”; but I can’t figure out any way to get these non-existent files out of the index
$ curl -H "X-API-Key: ..." 'localhost:8384/rest/db/file?folder=...&file=rust_test/target/debug/.cargo-lock'
{
"availability": null,
"global": {
"deleted": false,
"ignored": false,
"invalid": false,
"localFlags": 0,
"modified": "2019-02-27T00:30:11.065920388Z",
"modifiedBy": "DJZ6O3S",
"mustRescan": false,
"name": "guessing_game/target/debug/.cargo-lock",
"noPermissions": false,
"numBlocks": 1,
"permissions": "0644",
"sequence": 13380,
"size": 0,
"type": "FILE",
"version": [
"DJZ6O3S:1"
]
},
"local": {
"deleted": true,
"ignored": false,
"invalid": false,
"localFlags": 0,
"modified": "2019-02-27T00:30:11.065920388Z",
"modifiedBy": "DJZ6O3S",
"mustRescan": false,
"name": "guessing_game/target/debug/.cargo-lock",
"noPermissions": false,
"numBlocks": 0,
"permissions": "0",
"sequence": 721067,
"size": 0,
"type": "FILE",
"version": []
}
}