mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
A reported test environment (mongo:8.2.2 in Kubernetes) filled its data
volume: the checkpoint's fdatasync returned ENOSPC, WiredTiger panicked and
mongod aborted - and then it kept failing on every start, with the disk long
since freed. MongoDB 8.2 keeps a throwaway WiredTiger instance under
<dbPath>/_tmp/spilldb for queries that spill to disk and empties it itself on
each start; after the abort that emptying failed ("Failed to clear dbpath of
the internal WiredTiger instance: Directory not empty"), mongod opened the
half-emptied directory, found no version file, reported "Failed to open the
spill WiredTiger instance ... database corruption detected" and fasserted.
Nothing retries, so the pod restarts forever. The data itself is intact;
deleting that one directory is the whole fix.
- snap-src/bin/mongodb-control deletes _tmp/spilldb before every mongod
start (no mongod is running at that point, and mongod recreates it), and
its start-failure handler recognises the log line and names the directory.
The snap ships MongoDB 7 today, so this is a no-op until it does not.
- Admin Panel / Problems: the db.restart row now says what a "No space left
on device" abort means for a full disk as well as for a network
filesystem, and both it and db.disk-space name the exact spill directory
to delete when MongoDB 8.2 will not start afterwards. The probe looks the
data directory up once and passes it to both rows.
- docs/Databases/MongoDB/Storage-Requirements.md gets the log signature of
both stages, why the second one never ends, the one command, what must
not be touched, and that Docker/Kubernetes users run it themselves since
the database container is MongoDB's own image.
- tests/databaseHealth.test.cjs pins the spill path, both rows' advice, the
probe wiring, the snap's pre-start deletion (before the first start, after
the running-instance check, and the only recursive delete apart from the
existing FerretDB reset) and the documentation.
Thanks to xet7 !
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.
| 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.
- FerretDB v1 — the five backends, and how to start each
- FerretDB 2 + PostgreSQL install
- https://forums.meteor.com/t/ferretdb-1-18-now-has-oplog-support-trying-replace-mongodb-6-x-with-ferretdb-postgresql-or-ferretdb-sqlite/61092
MongoDB
- Driver-System.md — which Node driver is used for which server version
- Version-Management.md — detecting the server version and switching binaries
- Compatibility-Guide.md — MongoDB 3.0 … 8.0 with Meteor
- Oplog-Configuration.md — why the OpLog matters, and how to enable it
- OpLog-Enablement.md — its status per deployment platform
- avx-qemu.md — MongoDB 5+ on a CPU without AVX
- raspi4-qemu.md — MongoDB 5+ on a Raspberry Pi 4 and older
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.
- ToroDB/PostgreSQL/ — the compose file and notes kept here