[SERVER-70270] In jstests using failPoints, use waitForFailPoint command instead of checking logs Created: 06/Oct/22  Updated: 29/Oct/23  Resolved: 07/Oct/22

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

Type: Improvement Priority: Major - P3
Reporter: Ivan Fefer Assignee: Ivan Fefer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
Backwards Compatibility: Fully Compatible
Sprint: QE 2022-10-17
Participants:
Linked BF Score: 44

 Description   

Based on BF-26526.

For example this test: https://github.com/mongodb/mongo/blob/a7cda0d9cf32b7074b4c9a2efe6e6590b4dab564/jstests/core/txns/speculative_snapshot_includes_all_writes.js
1. Setups fail point.
2. Starts parallel shell to hit the fail point.
3. In main shell uses checkLog to find line about hitting the fail point.
4. Checks stuff

It can fail when between steps 2 and 3 too many events will happen so message about hitting the fail point will be pushed out of RAM log cache.

To avoid it, we need to replace checkLog with waitForFailPoint command, created specifically for this case: https://github.com/mongodb/mongo/wiki/The-%22failCommand%22-fail-point

Also, we should check other tests that may contain similar problems.



 Comments   
Comment by Githook User [ 07/Oct/22 ]

Author:

{'name': 'Ivan Fefer', 'email': 'ivan.fefer@mongodb.com', 'username': 'Fefer-Ivan'}

Message: SERVER-70270: Use fail_point_util.js instead of checkLog to wait for failpoint hit
Branch: master
https://github.com/mongodb/mongo/commit/27e71f251ee6a2136d10b895c72391f9c5a12d59

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