prefer secondary for searching

This commit is contained in:
Andris Reinman 2019-05-07 19:38:26 +03:00
parent 9bd34588c4
commit ead481c2bd

View file

@ -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;