Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-4244

replsethostnametrim.js works because of a race condition

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.0
    • Affects Version/s: None
    • Component/s: Replication
    • None
    • ALL

      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.

            Assignee:
            scotthernandez Scott Hernandez (Inactive)
            Reporter:
            kristina Kristina Chodorow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: