Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-2855

Create indexes fail

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.2
    • Component/s: None

      Starting from v3.6.2  - when creating index i'm getting the below error. (For v3.5.11 works ok.)

      Connection: atlas cluster

      Params: readPreference=nearest&auto_reconnect=true&connectTimeoutMS=60000&retryWrites=true&w=majority

       

      Meanwhile fixes with patch:
      dbHandle.collection(collectionName, { readPreference: ReadPreference.PRIMARY }).createIndex(keys, options);
       

      Reported error:

      error: MongoError: not master at MessageStream.messageHandler (mongodb/lib/cmap/connection.js:268:20) at MessageStream.emit (events.js:315:20) at processIncomingData (mongodb/lib/cmap/message_stream.js:144:12) at MessageStream._write (mongodb/lib/cmap/message_stream.js:42:5) at doWrite (_stream_writable.js:403:12) at writeOrBuffer (_stream_writable.js:387:5) at MessageStream.Writable.write (_stream_writable.js:318:11) at TLSSocket.ondata (_stream_readable.js:717:22) at TLSSocket.emit (events.js:315:20) at addChunk (_stream_readable.js:295:12) { operationTime: [Timestamp], ok: 0, code: 10107, codeName: 'NotMaster', '$clusterTime': [Object], [Symbol(errorLabels)]: [Set] }

            Assignee:
            matt.broadstone@mongodb.com Matt Broadstone
            Reporter:
            pesron@gmail.com Pesia Ronen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: