Files
wekan/docs/Databases
Lauri Ojansivu 8f27060b4e Database health: a nightly mongodump no longer raises the "documents per second" problem.
#6945: the probe compares MongoDB's scannedObjects between two probes, and
that counts every document read by anything. A nightly mongodump reads the
whole database, so its one interval went over 50,000 per second every
morning - 632,900 on an instance of 1.1 million cards - and the row said
"queries without a fitting index" while naming none, with nothing to fix.

A query without a fitting index is also a collection scan in MongoDB's
"Slow query" log, which the same probe already reads. Now the log is read
first, and the rate is reported only when a collection scan of the same
interval explains it (scanRateReportable). When the log cannot be read, the
rate alone decides, as before, so a missing index is never hidden. And the
scans of MongoDB's Database Tools themselves - mongodump and mongoexport,
named by their appName - are not reported as collection scans: they read
every collection whole by design.

Tests (tests/databaseHealthScans.test.cjs): a high rate with a scan, or
with the log unreadable, is reported; negative: a high rate with the log
read and no scan, and an ordinary rate, are not; the dump's own COLLSCAN
lines are no group, while the same scan by WeKan is; the probe reads the
log before it judges the rate, and nothing reports on the threshold alone.

Thanks to Raymond-Voogt and xet7 !

Fixes #6945.
2026-11-25 16:18:04 +02:00
..

Databases

WeKan stores its data in a MongoDB-compatible database. That can be MongoDB itself, or FerretDB — which speaks the MongoDB wire protocol and stores the data in SQLite, PostgreSQL, MySQL, MariaDB or SAP HANA. The default is FerretDB v1 with its embedded SQLite, so a fresh docker compose up -d needs no database server at all.

Which databases are supported, and how each is tested: Supported.md - FerretDB v1 on SQLite (the default), PostgreSQL, MySQL, MariaDB and SAP HANA, and MongoDB 6, 7, 8 and 9.

Directory What is in it
FerretDB/1/ FerretDB v1 — the default. SQLite, PostgreSQL, MySQL, MariaDB, SAP HANA
FerretDB/2/ FerretDB 2 — PostgreSQL with the DocumentDB extension
MongoDB/ MongoDB itself: drivers, versions, the OpLog, and old CPUs
Migrations/ WeKan's own schema migrations and how they are verified
ToroDB/ ToroDB — a MongoDB proxy to PostgreSQL. No longer developed

FerretDB

Replacing MongoDB with FerretDB. Both of the v1 backends WeKan ships by default are confirmed working with a real Meteor 3 client — the embedded SQLite and vanilla PostgreSQL (#6509); MySQL, MariaDB and SAP HANA are experimental.

MongoDB

Migrations

  • Migrations/ — the schema-migration system, its review notes and verify-migrations.sh

ToroDB

ToroDB is not developed anymore. ToroDB was about adding a MongoDB proxy to PostgreSQL or MySQL.