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.
Issue.
Getting asserts in logdev during recovery with mismatch in logdev idx and complaining header corrupted.
Cause
One of the logdev family 1 was not used for writes in UT and has no chunks. During recovery, when we read m_vdev_jd->sync_next_read(), we ignored the return value whether we read anything or not. On build machines, the return buffer contained garbage values, which later was considered as invalid header and end of log. log_stream_reader::next_group() line 58. For some reason on github actions, we get a proper loggroup header(from logdev family 0, because crc was matching with sequence number) as garbage value and causing it validate against a invalid header and doing a assert. This issue didnt happen before dynamic logdev changes because we had fixed number chunks for both logdev families and it read some junk and returned error with no more logdev data. Now we have situation of 0 chunks and no garbage data.
Fix
handle the return code m_vdev_jd->sync_next_read() and handle case where then is no data needs to be read.