Fix unused parameters in `replsettest.js`

XMLWordPrintableJSON

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

      In replsettest.js, the following two functions have parameters that are declared, but ignored.

      These parameters should either be actually used in the functions, or refactored out.

      /** https://github.com/10gen/mongo/blob/ae98f8385d845dfe5464c3516dc42292c36c5e85/jstests/libs/replsettest.js#L585-L601 */
      /** {{connToCheckForUnrecoverableRollback}} is not used */
          /**
           * A special version of awaitSecondaryNodes() used exclusively by rollback_test.js.
           * Wraps around awaitSecondaryNodes() itself and checks for an unrecoverable rollback
           * if it throws.
           */
          awaitSecondaryNodesForRollbackTest(timeout, secondaries, connToCheckForUnrecoverableRollback, retryIntervalMS) {
              retryIntervalMS = retryIntervalMS || 200;
              try {
                  MongoRunner.runHangAnalyzer.disable();
                  this.awaitSecondaryNodes(timeout, secondaries, retryIntervalMS);
                  MongoRunner.runHangAnalyzer.enable();
              } catch (originalEx) {
                  // Re-throw the original exception in all cases.
                  MongoRunner.runHangAnalyzer.enable();
                  throw originalEx;
              }
      
      /** https://github.com/10gen/mongo/blob/ae98f8385d845dfe5464c3516dc42292c36c5e85/jstests/libs/replsettest.js#L1023-L1029 */
      /** {{timeout}} is not used */
          status(timeout) {
              let primary = _callHello(this);
              if (!primary) {
                  primary = this._liveNodes[0];
              }
              return asCluster(this, primary, () => assert.commandWorked(primary.adminCommand({replSetGetStatus: 1})));
      

            Assignee:
            Unassigned
            Reporter:
            Joseph Obaraye
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: