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

assert.soonNoExcept should not print stack traces intermitently

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Replication
    • 0

    Description

      assert.soonNoExcept expects exceptions to occur. The stack traces it prints are not very helpful outside of the very last one, and can be misleading and alarming.

      Example:

      	
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.417+0000 caught exception Error: [null] != [{ "_id" : ObjectId("58cc40145f421e75d6272d0d"), "a" : 2 }] are not equal : Node ip-10-178-217-67:20260 contained op that should have been rolled back
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.627+0000 assert: [null] != [{ "_id" : ObjectId("58cc40145f421e75d6272d0d"), "a" : 2 }] are not equal : Node ip-10-178-217-67:20260 contained op that should have been rolled back
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.627+0000 doassert@src/mongo/shell/assert.js:18:14
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.628+0000 assert.eq@src/mongo/shell/assert.js:54:5
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.628+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:104:1
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.628+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:103:9
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.628+0000 _convertExceptionToReturnStatus@src/mongo/shell/assert.js:218:20
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.628+0000 assert.soonNoExcept/<@src/mongo/shell/assert.js:225:24
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.628+0000 assert.soon@src/mongo/shell/assert.js:196:17
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.629+0000 assert.soonNoExcept@src/mongo/shell/assert.js:225:5
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.629+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:102:5
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.629+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:6:2
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.629+0000 
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.629+0000 caught exception Error: [null] != [{ "_id" : ObjectId("58cc40145f421e75d6272d0d"), "a" : 2 }] are not equal : Node ip-10-178-217-67:20260 contained op that should have been rolled back
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.832+0000 assert: [null] != [{ "_id" : ObjectId("58cc40145f421e75d6272d0d"), "a" : 2 }] are not equal : Node ip-10-178-217-67:20260 contained op that should have been rolled back
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.832+0000 doassert@src/mongo/shell/assert.js:18:14
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.832+0000 assert.eq@src/mongo/shell/assert.js:54:5
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.832+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:104:1
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.832+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:103:9
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.833+0000 _convertExceptionToReturnStatus@src/mongo/shell/assert.js:218:20
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.833+0000 assert.soonNoExcept/<@src/mongo/shell/assert.js:225:24
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.833+0000 assert.soon@src/mongo/shell/assert.js:196:17
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.833+0000 assert.soonNoExcept@src/mongo/shell/assert.js:225:5
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.833+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:102:5
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.833+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:6:2
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.833+0000 
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.834+0000 caught exception Error: [null] != [{ "_id" : ObjectId("58cc40145f421e75d6272d0d"), "a" : 2 }] are not equal : Node ip-10-178-217-67:20260 contained op that should have been rolled back
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.834+0000 assert.soon failed: () => _convertExceptionToReturnStatus(func)
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.834+0000 doassert@src/mongo/shell/assert.js:18:14
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.834+0000 assert.soon@src/mongo/shell/assert.js:202:13
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.834+0000 assert.soonNoExcept@src/mongo/shell/assert.js:225:5
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.834+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:102:5
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.835+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:6:2
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.835+0000 
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.835+0000 2017-03-17T20:04:36.831+0000 E QUERY    [thread1] Error: assert.soon failed: () => _convertExceptionToReturnStatus(func) :
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.835+0000 doassert@src/mongo/shell/assert.js:18:14
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.835+0000 assert.soon@src/mongo/shell/assert.js:202:13
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.835+0000 assert.soonNoExcept@src/mongo/shell/assert.js:225:5
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.836+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:102:5
      [js_test:write_concern_after_stepdown_and_stepup] 2017-03-17T20:04:36.836+0000 @jstests/replsets/write_concern_after_stepdown_and_stepup.js:6:2
      

      Attachments

        Activity

          People

            judah.schvimer@mongodb.com Judah Schvimer
            judah.schvimer@mongodb.com Judah Schvimer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: