i#6721: Read ahead in as-traced drmemtrace mode #6722
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removes the exception for avoiding reading ahead to get the version and filetype for as-traced drmemtrace mode, as we need those values for the record_filter.
Adds explicit error checking and error return up front to the record_filter for missing version info.
Adjusts the scheduler unit test's record ordinal to account for the new read-ahead.
Adds a test with a checked-in trace of hello,world (truncated to make it smaller) that ran on 4 different cores. The test only reproduces the problem if the read-ahead in open_reader() to find the tid is removed, which I did temporarily; I kept the test as it is also a good additional general test of other corner cases. To create a test that always reproduces in our suite we would need to combine a synthetic reader with use of the scheduler in as-traced mode, which none of our unit tests are set up for.
The fix was further tested on large inputs in an internal setup which always passes a synthetic reader, where the problem reproduces every time without the fix.
Fixes #6721