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

nodejs-native-driver crash

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • Ubuntu 14.04 LTC
      MongoDB v. 2.0.9
      nodejs v.0.10.37
      mongodb@2.0.47
      mongo-core@1.2.20

    Description

      I'm currently trying to switch to the latest version of nodejs-native-driver (mongodb@2.0.47) and discovered the issues demonstrated by the attached script (testReplicaSet.js). It consistently crashes when execution time exceeds the specified haInterval with the error in error.txt attachment. Some additional information:

      • crash occurs after ismaster command was issued by line "server.command('system.$cmd', {ismaster:true}

        , function(err, r)

        {...}" inside inspectServer function in file mongodb-core/lib/topologies/replset.js.
        - I can see that ismaster cmd returns inside self.s.callbacks.register(query.requestId, function(err, result) {...}

        (line 763 in mongodb-core/lib/topologies/server.js and crash occurs with the attempt to execute the next command.

      • the same code works perfectly fine with the versions 1.4.* of mongodb. I tested with 1.4.3.

      I also found the following issue. Accordingly to documentation (http://mongodb.github.io/node-mongodb-native/2.0/api/ReplSet.html) option

      {ha: false}

      is supposed to turn off high availability monitoring. However when I used

      var replicaSet = new ReplicaSet(servers, {ha: false});
      

      instead of

      ar replicaSet = new ReplicaSet(servers, {haInterval: haInterval});
      

      in my sample, it did not take any effect and mongo-code code used default value for haInterval (10000).

      Is something wrong in my code?
      If yes, please tell me what should I change.
      If no and that's a bug in driver, is there any workaround you can suggest?

      Attachments

        1. error.txt
          1 kB
        2. testMongoClient.js
          1 kB
        3. testMongoClient1.js
          2 kB
        4. testRepicaSet5.output.txt
          10 kB
        5. testReplicaSet.js
          2 kB
        6. testReplicaSet1.js
          1 kB
        7. testReplicaSet5.js
          3 kB

        Activity

          People

            Unassigned Unassigned
            svolvo Sergey Volvovski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: