Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major - P3
-
None
-
None
-
None
-
-
Empty show more show less
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?