Ericsson / codechecker

CodeChecker is an analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy
https://codechecker.readthedocs.io
Apache License 2.0
2.25k stars 377 forks source link

indicated locked database #1445

Open gyorb opened 6 years ago

gyorb commented 6 years ago

Give the user some warning if deleting a run is not possible because it is locked.

bruntib commented 4 years ago

How can a database be locked?

whisperity commented 4 years ago

@bruntib

How can a database be locked?

The user specified in the connection string does not have write access, or a schema transaction (such as an ongoing migration?) or the database server (e.g. for a journaling recovery or after sensing a corrupted physical layer (data storage files)) put an exclusive system lock on the database itself.

It SHOULD be rare in normal circumstances, but not something that can't happen at all.

I don't know the exact details on how it can happen with Postgres. MySQL was really trigger happy on locking you out of your own database if the backing files were corrupted (sometimes due to some COW or RAID falling out of sync).

The most simple answer could be the backing files (or file for SQLite) having the write permission removed?