mirror of
https://github.com/wekan/wekan.git
synced 2026-11-25 04:49:41 -05:00
`snap run wekan.database-compare` answered "MongoDB: <unreadable>" and "FerretDB: <unreadable>" on a live instance whose wekan.sqlite was 85 MB and whose site was up at the time. FerretDB was unreadable BECAUSE it was up: SQLite has one writer, so the second FerretDB the comparison started against the same directory did not get the data. The tool then reported the database it had been talking to all along as unreadable, and refused to choose. The live one is asked first now - `db-eval evidence` only counts and sorts - and a second copy is started only for a database that is not running. Both speak the MongoDB wire protocol on the same port, so which one is answering is asked rather than assumed: `db-eval kind` reads buildInfo, where FerretDB names itself and a mongod does not. Reading one as the other would be a wrong answer given with confidence, which is worse than "unreadable". database-compare is autopick with --dry-run, so the automatic choice at startup and the command an admin runs by hand both get it. tests/snapCompareReadsLiveDatabase.test.cjs pins all of it. Thanks to waltermhl and xet7 ! #6583 comment 5291730920