-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: 3.1.0
-
Component/s: None
-
Empty show more show less
If I use mongodb ReplicaSet where I connect with ReadPreference other than 'primary' and use methods which returns data and update it with same atomic operation (for example 'findAndUpdate') then sometimes I get error (depends if read goes to secondary or not):
MongoError: not master
at /opt/app/node_modules/mongodb-core/lib/connection/pool.js:580:63
at authenticateStragglers (/opt/app/node_modules/mongodb-core/lib/connection/pool.js:503:16)
at Connection.messageHandler (/opt/app/node_modules/mongodb-core/lib/connection/pool.js:539:5)
at emitMessageHandler (/opt/app/node_modules/mongodb-core/lib/connection/connection.js:309:10)
at TLSSocket.<anonymous> (/opt/app/node_modules/mongodb-core/lib/connection/connection.js:452:17)
at TLSSocket.emit (events.js:182:13)
at TLSSocket.EventEmitter.emit (domain.js:442:20)
at addChunk (_stream_readable.js:283:12)
at readableAddChunk (_stream_readable.js:264:11)
at TLSSocket.Readable.push (_stream_readable.js:219:10)
at TLSWrap.onread (net.js:635:20)
Problem appeared with latest driver 3.1.0. Before worked normally.