From ead481c2bdf5f5ef6ba8b5b8c1007b5124d5fea6 Mon Sep 17 00:00:00 2001 From: Andris Reinman Date: Tue, 7 May 2019 19:38:26 +0300 Subject: [PATCH] prefer secondary for searching --- lib/handlers/on-search.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/handlers/on-search.js b/lib/handlers/on-search.js index 4affb843..03cd1e2b 100644 --- a/lib/handlers/on-search.js +++ b/lib/handlers/on-search.js @@ -359,6 +359,7 @@ module.exports = server => (mailbox, options, session, callback) => { uid: true, modseq: true }) + .setReadPreference('secondaryPreferred') .maxTimeMS(consts.DB_MAX_TIME_MESSAGES); let highestModseq = 0;