[SERVER-4244] replsethostnametrim.js works because of a race condition Created: 10/Nov/11  Updated: 11/Jul/16  Resolved: 15/Nov/11

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 2.1.0

Type: Bug Priority: Major - P3
Reporter: Kristina Chodorow (Inactive) Assignee: Scott Hernandez (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

It is not testing what it's supposed to be, I think. Try applying this patch and the test fails:

— a/jstests/replsets/replsethostnametrim.js
+++ b/jstests/replsets/replsethostnametrim.js
@@ -4,7 +4,7 @@ var replTest = new ReplSetTest(

{ name: 'testSet', nodes: 1 }

);
var nodes = replTest.startSet();
replTest.initiate();

-var master = replTest.nodes[0];
+var master = replTest.getMaster();
var config = master.getDB("local").system.replset.findOne();
config.version++;
var origHost = config.members[0].host;

It is only working because reconfig returns 0 if the set isn't ready yet.



 Comments   
Comment by auto [ 15/Nov/11 ]

Author:

{u'login': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-4244: cleanup test, remove dugging print statements.
Branch: master
https://github.com/mongodb/mongo/commit/8770fd7de4cf4aae9d4021906300373a932f6b0f

Comment by Kristina Chodorow (Inactive) [ 15/Nov/11 ]

http://buildbot.mongodb.org/builders/Linux%2064-bit%20debug%20dur%20off/builds/424/steps/test_1/logs/stdio
http://buildbot.mongodb.org/builders/Linux%2032-bit%20debug/builds/891/steps/test_1/logs/stdio

Comment by auto [ 14/Nov/11 ]

Author:

{u'login': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-4244: bad scott, race condition causer!
Branch: master
https://github.com/mongodb/mongo/commit/c31b96a8bc41941774e90828a5c5653688f293ee

Generated at Thu Feb 08 03:05:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.