mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
Follow-up to enabling the FerretDB OpLog by default (#6480, #6481). Setting MONGO_OPLOG_URL alone can make Meteor fail to start if OpLog tailing does not actually work (the same way WeKan on Windows with MongoDB falls back to polling). Fix: every FerretDB launch path now also sets METEOR_REACTIVITY_ORDER=oplog,polling — Meteor tries the drivers left-to-right and uses OpLog ONLY when tailing works, otherwise polling, so a broken/absent OpLog never blocks startup. Previously only docker-compose set this; the snap (wekan-control), the bundle (start-wekan.sh/.bat) and the docker entrypoint (wekan-entrypoint.sh) set MONGO_OPLOG_URL WITHOUT the polling fallback. The kill-switch path (WEKAN_FERRETDB_OPLOG=false) now selects polling-only. Admin Panel / Version already reports which driver is actually live: server/ statistics.js derives "Reactivity mode" (oplog / changeStreams / polling) and "MongoDB Oplog enabled" from Meteor's live _oplogHandle, so it shows `polling` whenever OpLog did not come up — the direct way to confirm whether FerretDB is on OpLog or polling. Tests: tests/ferretdbOplog.test.cjs now asserts the oplog,polling fallback in every launch path, the polling-only kill-switch path, and that the Version page detects + displays the live reactivity driver. Thanks to uusijani, Nissulya and xet7 ! Fixes #6480, Fixes #6481.