[SERVER-82146] Investigate uncaught failures when using DatabaseNameUtil::deserialize assertions Created: 12/Oct/23  Updated: 23/Jan/24

Status: Needs Scheduling
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Hugh Tong (Inactive) Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: ntdi_releasability
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Participants:
Story Points: 3

 Description   

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.


Generated at Thu Feb 08 06:48:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.