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

Investigate uncaught failures when using DatabaseNameUtil::deserialize assertions

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Service Arch
    • 3

      Replacing the DatabaseNameUtil::deserialize() tenantId assertions with invariants will allow us to examine sites in test infrastructure or in the binary that we may not have accounted for but would still otherwise allow tests to pass.

      For example, we can trigger a crash doing this when list_indexes.js is run with the multitenancy_jscore_passthrough.  At some point, we close the cursor which will issue killCursors commands, at this point with correct tenantIds.  After closing the cursors and end of the test we attempt to access a closed cursor, which triggers an assertion as expected and caught.  However, after the test has consumed the assertion (ie. after the test concludes), during cleanup some test infrastructure elsewhere issues another killCursors command, but because it was not part of this test it has no knowledge of the tenantId, and issues the command without a tenantId triggering the invariant.

      It's likely that because this occurs after the test has exited, the assertion is never captured as a failure and allows the test to pass.  It's possible there are several other similar cases that are highlighted by this exercise.

            Assignee:
            backlog-server-servicearch [DO NOT USE] Backlog - Service Architecture
            Reporter:
            hugh.tong@mongodb.com Hugh Tong (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: