[monorepo] enable mongo notablescan for all services but web (#29497)

* [migrations] make old migrations compatible with --notablescan in mongo

Re-running the migration for db.users.emails.reversedHostname on all
Server Pro/CE users will not be harmfull.

* [monorepo] enable mongo notablescan for all services but web

GitOrigin-RevId: e2a710c9de08de9ac2aa9df1f3082d5f1c33ea05
This commit is contained in:
Jakob Ackermann
2025-11-05 09:06:35 +00:00
committed by Copybot
parent 2ebc411db4
commit 6691c5dc05
19 changed files with 68 additions and 81 deletions
+1 -1
View File
@@ -95,7 +95,7 @@ services:
mongo:
image: mongo:8.0.11
command: --replSet overleaf
command: --replSet overleaf --notablescan
volumes:
- ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
- ../../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
+2 -1
View File
@@ -16,6 +16,7 @@ services:
- ../../node_modules:/overleaf/node_modules
- ../../libraries:/overleaf/libraries
- ../../bin/shared/wait_for_it:/overleaf/bin/shared/wait_for_it
- ../../tools/migrations:/overleaf/tools/migrations
working_dir: /overleaf/services/history-v1
environment:
MOCHA_GREP: ${MOCHA_GREP}
@@ -99,7 +100,7 @@ services:
mongo:
image: mongo:8.0.11
command: --replSet overleaf
command: --replSet overleaf --notablescan
volumes:
- ../../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
- ../../bin/shared/mongodb-docker-entrypoint-wait.sh:/mongodb-docker-entrypoint-wait.sh
+2 -1
View File
@@ -20,7 +20,8 @@ async function setupPostgresDatabase() {
async function setupMongoDatabase() {
this.timeout(60_000)
await promisify(exec)(
`cd ../../tools/migrations && npm run migrations -- migrate -t server-ce`
// Run saas migrations for backup indexes
`cd ../../tools/migrations && npm run migrations -- migrate -t saas`
)
}