Database Problems

Here’s an interesting issue we just had. Names changed to protect the innocent. :smile:

Let’s say we have three folders: files, documents, and stuff. 8 People are sharing them, and we want to add two more, but we only want to share documents. What happens instead is that one of the 8 shares all three with the two new people, and one of the new people nests the folders like this:

documents
     stuff 
         files

What’s worse, is this person drops 300,000 small files (source code) into files, which adds them to both stuff and documents on everybody else’s machine. What’s even worse, is that the person who shared the folders added him as an Introducer, which messed up everybody else’s machine.

What I’ve done so far is have everybody disconnect from this person until he can straighten out his directory structure. On my machine, I’ve deleted the folder structures that should not have synced. What I’m getting, however, is the puller stopping because of “no such file or directory” errors, since I deleted the offending files and now there’s no source for them.

Is there any way to fix this? Should I clear out the Syncthing database?

On my node, I switched to the Boltdb version using the link from this thread:

It has fixed the issue. This tells me that if I had blown away my database, it also would have fixed the issue. I don’t, however, want to do that.

Is there any way to map the .ldb database file to the folder share, so I can just remove the file that goes with this messed up folder? That way I can get back on standard Syncthing without having to rebuild my entire database.

Thanks!

You can just remove the folder, restart, readd it, restart again.

One ldb file does not map into anything, as the whole set of files represent the database.