When index is corrupted, can we auto delete it?

As the title says “When index is corrupted, can we auto delete it?” this prevents manual intervention. We have 18 connected devices, as this grows it will become increasingly annoying having to use RDP or get users to do this.

What do you mean by corrupted though?

A hard shutdown i.e. user holds the power button until computer turns off.

Yeah, but what effect does the corruption have. Syncthing fails to start, or has high CPU usage or what?

Would be a nice feature. I use a raspi, which is obviously slow at indexing and so on. If I restart too fast after the last reboot and, I think, it is still indexing, the database is corrupted and syncthing won’t start to work. It is just mourning about the corrupted database and does nothing.

If a machine is not shutdown correctly it displays

FATAL: Cannot open database: leveldb/storage: corrupted or incomplete CURRENT file - Is another copy of Syncthing already running?

And won’t start.

I think this is #987

Yes just a slightly different error message there but @calmh knows why this is happening from his comment.

The problem is detecting it, as it might give an error, it might panic, etc. I think @calmh has plans to move away to sqlite mitigating the issue all together.