nodejs-native-driver crash

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Environment:
      Ubuntu 14.04 LTC
      MongoDB v. 2.0.9
      nodejs v.0.10.37
      mongodb@2.0.47
      mongo-core@1.2.20
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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?

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

            Assignee:
            Unassigned
            Reporter:
            Sergey Volvovski
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: