-
-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
source: more properly ignore truncated partitions
A truncated partition can come at any moment, even before we read the magic. We need to not set the partition error if we fail reading. In some places, particularly when we validate we have enough length ahead of time, we do now properly set the partition error because if we have enough length, we should be able to decode. We now only use LastOffsetDelta if we properly decoded all records. If we did not before, then we could have failed on reading a truncated batch and then skipped all records. Finally, if we decode a magic we do not know of, we set an error in our response and properly skip the offset.
- Loading branch information
Showing
1 changed file
with
52 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters