Repository navigation
Backport #115222 to 26.7: Bound text index posting list deserialization - #116536
Conversation
|
Workflow [BackportPR], commit [7658293] Summary: ❌
|
|
@groeneai fix CI in this backport |
|
Same cause as #116535, and the same one-line fix.
- return PostingsSerialization(nullptr, MergeTreeTextIndexSerializationVersion::V2_WithPositions);
+ return PostingsSerialization(std::make_unique<PostingListCodecNone>(), MergeTreeTextIndexSerializationVersion::V2_WithPositions);and restore
Full write-up, including why master is green and why the same file went unvalidated onto 26.3 and 26.5: #116535 (comment) I have no push access to |
… codec `PostingsSerialization`'s constructor asserts its codec is non-null (`chassert(posting_list_codec)`, `MergeTreeIndexText.cpp:218`), and the rewritten `gtest_text_index_postings_deserialization.cpp` on this branch passes `nullptr`. The first `decodePostingsInPlace` call in `RoundTrip` therefore aborts inside the constructor, before `deserialize` is entered. That is why `Unit tests (asan_ubsan)` and `Unit tests (tsan)` fail on the backport while every `Build` job is green (`chassert` is inert in release), why the `function_prop_fuzzer` variants pass (they filter this suite out), and why `TruncatedPayloadRejected` never reported. The test's comment is accurate about `deserialize`: with `header = 0` the uncompressed branch never consults the codec. The constructor asserts first, though, so the precondition has to be satisfied regardless. A `Type::None` codec keeps coverage identical, because `PostingListCodecNone::decode` is a no-op: had the codec been consulted, `RoundTrip` would deserialize an empty posting list and fail on cardinality. It passes, so the assertions still traverse the `PostingList::readSafe` bounding this backport adds. Reverting that bound while keeping this change makes `TruncatedPayloadRejected` fail all four assertions, so the repaired test still catches the defect it was written for. `MergeTreeIndexText.h` includes only `IPostingListCodec.h`, so the codec header has to be included here; the version of this test on `master` carries the same include. Related: #115222 Co-Authored-By: Claude Opus 5 <[email protected]>
|
Opened #116636 against this branch: #116636 Validated on a Debug build of this branch: unpatched, |
Fix the text index postings unit test aborting on a null posting list codec
Original pull-request #115222
Cherry-pick pull-request #116311
This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.
The PR source
The PR is created in the CI job
Version info
26.7.6.20