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

Investigate failing parallel shell in rollback index tests

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 5.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Fully Compatible
    • ALL
    • Hide

      Remove checkExitSuccess from jstests/replsets/libs/rollback_index_builds_test.js:138 and run it.

      Show
      Remove checkExitSuccess from  jstests/replsets/libs/rollback_index_builds_test.js:138 and run it.
    • Repl 2021-10-04, Repl 2021-10-18

      SERVER-58200 modified startParallelShell to ensure that whenever a parallel shell is started, the cleanup function returned by startParallelShell must be called in that shell, or the whole test fails.

      As a part of this ticket, we modified the rollback index tests to run the function, which checks the exit code of the parallel shell, and throws an error if it's not 0.

      The following tests began to fail:

      	modified:   jstests/replsets/rollback_index_build_and_create.js
      	modified:   jstests/replsets/rollback_index_build_start.js
      	modified:   jstests/replsets/rollback_index_build_start_abort.js
      	modified:   jstests/replsets/rollback_index_build_start_abort_not_create.js
      	modified:   jstests/replsets/rollback_waits_for_bgindex_completion.js
      

      with the following assertion:

      [js_test:rollback_index_build_and_create] Error: [0] != [252] are not equal : encountered an error in the parallel shell :
      [js_test:rollback_index_build_and_create] doassert@src/mongo/shell/assert.js:20:14
      [js_test:rollback_index_build_and_create] assert.eq@src/mongo/shell/assert.js:179:9
      [js_test:rollback_index_build_and_create] startParallelShell/<@src/mongo/shell/servers_misc.js:182:13
      [js_test:rollback_index_build_and_create] runSchedules/</<@jstests/replsets/libs/rollback_index_builds_test.js:138:47
      [js_test:rollback_index_build_and_create] runSchedules/<@jstests/replsets/libs/rollback_index_builds_test.js:138:13
      [js_test:rollback_index_build_and_create] runSchedules@jstests/replsets/libs/rollback_index_builds_test.js:61:9
      [js_test:rollback_index_build_and_create] @jstests/replsets/rollback_index_build_and_create.js:26:1
      [js_test:rollback_index_build_and_create] @jstests/replsets/rollback_index_build_and_create.js:4:2
      [js_test:rollback_index_build_and_create] failed to load: jstests/replsets/rollback_index_build_and_create.js
      

      The parallel shell is launched in jstests/replsets/libs/rollback_index_builds_test.js:116. (Off commit e502f2d3965ac4147d303e956a582b7c4eef8232) Here's the whole stack trace of when the parallel shell is launched:

      [js_test:rollback_index_build_and_create] printStackTrace@src/mongo/shell/utils.js:138:15
      [js_test:rollback_index_build_and_create] startParallelShell@src/mongo/shell/servers_misc.js:114:5
      [js_test:rollback_index_build_and_create] startIndexBuild@jstests/noPassthrough/libs/index_build.js:39:16
      [js_test:rollback_index_build_and_create] runSchedules/</<@jstests/replsets/libs/rollback_index_builds_test.js:116:42
      [js_test:rollback_index_build_and_create] runSchedules/<@jstests/replsets/libs/rollback_index_builds_test.js:76:13
      [js_test:rollback_index_build_and_create] runSchedules@jstests/replsets/libs/rollback_index_builds_test.js:61:9
      [js_test:rollback_index_build_and_create] @jstests/replsets/rollback_index_build_and_create.js:26:1
      [js_test:rollback_index_build_and_create] @jstests/replsets/rollback_index_build_and_create.js:4:2
      

       

      STM has set the checkExitSuccess flag to false on the cleanup function of the parallel shell to prevent the error from causing these tests to go red and to preserve existing semantics. We'd like someone to investigate if the parallel shell failure is expected (in which case checkExitSuccess should remain false), or if it's unexpected and the test needs to be modified. 

            Assignee:
            adi.zaimi@mongodb.com Adi Zaimi
            Reporter:
            richard.samuels@mongodb.com Richard Samuels (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: