airborne12 opened a new pull request, #69244:
URL: https://github.com/apache/doris/pull/69244
### What problem does this PR solve?
Issue Number: CIR-22263
Related PRs: #69192 (source), #69206 (branch-4.2 prerequisite)
Problem Summary: Compatible docs-only (T1) SNII postings currently fall back
to rebuilding from raw columns when the destination does not request phrase
positions. Backport the source PR's streamed merge support while retaining raw
rebuild for incompatible or gram sources.
Source squash commit: `8db05407dcf574c90da47579acb0ad7af57e027a`. The
backport keeps its cherry-pick provenance and adds one branch-4.2 adaptation
commit. The seven SNII implementation and focused test files have
byte-identical postimages to the source commit.
#### Hunk audit
| Source file or hunk | Disposition |
| --- | --- |
| `be/src/storage/index/inverted/snii/compaction/eligibility.cpp` | Ported
verbatim. |
| `be/src/storage/index/inverted/snii/compaction/eligibility.h` | Ported
verbatim. |
| `be/src/storage/index/inverted/snii/compaction/posting_cursor.cpp` |
Ported verbatim. |
| `be/src/storage/index/inverted/snii/compaction/snii_index_compaction.cpp`
| Ported verbatim. |
| `be/src/storage/index/inverted/snii/compaction/snii_index_compaction.h` |
Ported verbatim. |
|
`be/test/storage/index/inverted/snii/compaction/snii_compaction_eligibility_test.cpp`
| Ported verbatim. |
|
`be/test/storage/index/inverted/snii/compaction/snii_index_compaction_test.cpp`
| Ported verbatim. |
| `be/src/storage/compaction/compaction.cpp` `@@ -1338 +1338,2 @@` | N/A:
branch-4.2 has no `dest_segment_ids` mapping or `Rowset::segment()` API. Its
compaction output and adjacent CLucene writer path use destination ordinals;
nonzero start IDs are assigned only to transient partial-update writers. Kept
the target's ordinal lookup. |
|
`be/test/storage/index/inverted/clucene/compaction/index_compaction_test.cpp`
`@@ -1816,7 +1816 @@` | Ported: both sibling indexes must merge. |
| Same file `@@ -1825,2 +1819,2 @@` | Adapted to the target's local segment
numbering. |
| Same file `@@ -1829 +1823 @@` | Ported: both index IDs must be eligible. |
| Same file `@@ -1833,2 +1827,3 @@` | Adapted because the target helper has
no physical segment start ID parameter. |
| Same file `@@ -1840,2 +1835,4 @@` | Adapted to `Rowset::segment_path()`
because `Rowset::segment()` is unavailable. |
| Same file `@@ -1848 +1844,0 @@` | Ported: removed the obsolete raw-rebuild
assertion comment. |
| Same file `@@ -1850,2 +1846,2 @@` | Ported: checks document counts in each
output segment. |
| Same file `@@ -1853,0 +1850,10 @@` | Adapted: compares streamed and
raw-rebuilt bytes by local segment ordinal. |
`git range-diff` matches the source squash to the `-x` cherry-pick and shows
one additional adaptation commit. The physical-ID lookup is omitted for the API
and output segment model above; the docs-only eligibility and merger changes
are preserved.
### Release note
Compatible docs-only SNII indexes use streamed compaction on branch-4.2.
### Check List (For Author)
- Test
- [x] Unit Test:
`SniiCompactionEligibilityTest.*:SniiIndexCompactionTest.*:IndexCompactionTest.snii_native_merge*`
passed, 38/38 tests. The source-added docs-only cases and the sibling merge
case ran. No ASAN or LeakSanitizer report appeared.
- [x] Regression test: `test_storage_format_snii` passed, 1 suite, 0
failures, on an isolated local FE/BE cluster.
- [x] Manual test: full FE and BE builds passed. The isolated cluster
reported BE Alive=true and `SELECT 1` succeeded.
- Behavior changed:
- [x] Yes. Compatible docs-only postings are streamed rather than
rebuilt from raw columns.
- Does this need documentation?
- [x] No.
The complete committed PR diff passes the English description check. The
merged target tree passes clang-format 16. The worktree is clean.
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]