Repository navigation
Add readBigStrict and use it in buffer deserialization - #107196
Conversation
|
Workflow [PR], commit [2d3ec60] Summary: ❌
AI ReviewSummaryThis PR adds Tests
Final VerdictStatus: Minimum required action: add the focused corrupted |
| data.resize(initial_size + bytes_to_read); | ||
| stream->ignore(bytes_to_skip); | ||
| size_t size = stream->readBig(reinterpret_cast<char*>(&data[initial_size]), bytes_to_read); | ||
| if (size != bytes_to_read) |
There was a problem hiding this comment.
This guard is the behavioral contract of the PR, but there is no regression test for it. Please add a focused test that creates a MergeTree part using string_serialization_version = with_size_stream, truncates the String data stream while leaving the size stream intact, and verifies that reading the part fails with this INCORRECT_DATA path instead of returning a malformed ColumnString or surfacing a later LOGICAL_ERROR. Without coverage, the next readBig refactor can silently reintroduce the partial-read behavior this is fixing.
readBigStrict and use it in buffer deserialization
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 17/19 (89.47%) | Lost baseline coverage: none · Uncovered code |
dabafca
Tests for changes in ClickHouse#107196
|
Hi @Ergus @Avogar — a couple of suggestions to make this PR easier for reviewers and the changelog reader. Description (currently
Ignore this if the current title/body is intentional. |
Add a size match check after
readBigChangelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Version info
26.6.1.707