[SERVER-56989] Improve the debugging of change stream test-suite Created: 16/May/21  Updated: 29/Oct/23  Resolved: 03/Jun/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Task Priority: Major - P3
Reporter: Rishab Joshi (Inactive) Assignee: Rishab Joshi (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Backwards Compatibility: Fully Compatible
Sprint: Query Execution 2021-05-31, Query Execution 2021-06-14
Participants:
Linked BF Score: 26

 Description   

Currently, the change stream does not log 2 objects that are being compared if there is an assertion failure. Consider the snippet:

assert.eq(bsonWoCompare(getMorePBRT, txnEvent3._id), 0);

Where if getMorePBRT != txnEvent3._id and the test case fails, we have no way to figure out what value these two objects contain.

Logging such objects' values might help in making a correlation with the C++ logs.

The proposal here is to do something like this:

Just before such assertion checks, create a dictionary containing objects been compared.
Like this for the above example:

let objectValues = {
  getMorPBRT: getMortPBRT,
  txnEvent3_id: txnEvent3._id
}

And then checking fo the condition like this:

assert.eq(bsonWoCompare(getMorePBRT, txnEvent3._id), 0, objectValues);

 

In case of assertion failure, the object_values will be dumped.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 03/Jun/21 ]

Author:

{'name': 'Rishab Joshi', 'email': 'rishab.joshi@mongodb.com', 'username': 'rishvin'}

Message: SERVER-56989: Dump debugging information in case of comparison failure
for report_post_batch_resume_token_mongod.js
Branch: master
https://github.com/mongodb/mongo/commit/ccdda22e09a877afb86de220ccbb5434ea596367

Generated at Thu Feb 08 05:40:42 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.