Skip to content

branch-4.1:[fix](build) Keep Arrow 17 and 24 in shared thirdparty - #67320

Closed
hubgeter wants to merge 3 commits into
apache:branch-4.1from
hubgeter:backport/pr-66546-branch-4.1
Closed

branch-4.1:[fix](build) Keep Arrow 17 and 24 in shared thirdparty#67320
hubgeter wants to merge 3 commits into
apache:branch-4.1from
hubgeter:backport/pr-66546-branch-4.1

Conversation

@hubgeter

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: None

Related PR: #66546

Problem Summary: Current branch-4.1 includes the Arrow 24 upgrade and can consume the same thirdparty installation as master. Installing Arrow 24 and Paimon against the legacy root prefix overwrites the Arrow 17 ABI expected by pre-upgrade branch-4.1 revisions and can leave mixed or stale artifacts after interrupted rebuilds. Keep Arrow 17 and Paimon 17 in the unversioned compatibility prefix, install the Arrow 24 and Paimon 24 ABI-coupled stack in a versioned prefix selected by the current branch, fingerprint and validate both stacks independently, and rebuild only the invalid stack. Preserve branch-4.1-specific build and test layout while backporting the shared-stack lifecycle coverage.

Release note

None

Check List (For Author)

  • Test

    • Regression test
    • Unit Test
    • Manual test (add detailed scripts or steps below)
    • No need to test or manual test. Explain why:
      • This is a refactor/code format and no logic has been changed.
      • Previous test can cover this change.
      • No code files have been changed.
      • Other reason
  • Behavior changed:

    • No.
    • Yes.
  • Does this need documentation?

    • No.
    • Yes.

Check List (For Reviewer who merge this PR)

  • Confirm the release note
  • Confirm test cases
  • Confirm document
  • Add branch pick label

### What problem does this PR solve?

Issue Number: None

Related PR: apache#66546

Problem Summary: Current branch-4.1 includes the Arrow 24 upgrade and can consume the same thirdparty installation as master. Installing Arrow 24 and Paimon against the legacy root prefix overwrites the Arrow 17 ABI expected by pre-upgrade branch-4.1 revisions and can leave mixed or stale artifacts after interrupted rebuilds. Keep Arrow 17 and Paimon 17 in the unversioned compatibility prefix, install the Arrow 24 and Paimon 24 ABI-coupled stack in a versioned prefix selected by the current branch, fingerprint and validate both stacks independently, and rebuild only the invalid stack. Preserve branch-4.1-specific build and test layout while backporting the shared-stack lifecycle coverage.

### Release note

None

### Check List (For Author)

- Test: Manual test
    - PASS: ./thirdparty/test/arrow-paimon-lifecycle-test.sh
    - PASS: bash -n on all changed shell scripts
    - PASS: ./build-support/clang-format.sh
    - PASS: ./build-support/check-format.sh
    - PASS: non-patch git diff --check and Arrow 17 patch byte-identity checks
    - Not run: full BE build; the filesystem is 99% used and this worktree does not have a valid dual-stack thirdparty installation, so rebuilding both stacks risks exhausting disk space
- Behavior changed: Yes. Current branch-4.1 selects versioned Arrow 24/Paimon 24 while preserving the root Arrow 17/Paimon 17 compatibility stack.
- Does this need documentation: No
@hubgeter
hubgeter requested a review from yiguolei as a code owner August 31, 2026 02:39
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@hubgeter

Copy link
Copy Markdown
Contributor Author

run buildall

@hubgeter

Copy link
Copy Markdown
Contributor Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed against the verified PR head 0ed1bb2 (base 2c3ae38). I found three actionable correctness issues in the shared Arrow/Paimon lifecycle. The user focus file specifies no additional focus; the review covered the full changed-file set and the Arrow 17/24 prefix, source, patch, and CMake interactions.

Validation performed: all changed shell scripts pass bash -n; thirdparty/test/arrow-paimon-lifecycle-test.sh passes. No build was attempted, per the review instructions. The remaining candidate points were either dismissed with concrete evidence (alias/package closure, INT96/LZO/Thrift parity, Arrow Compute target gating, and the unsupported custom-prefix cache path) or are covered by the inline comments below.

Comment thread thirdparty/arrow-paimon-vars.sh
Comment thread thirdparty/build-thirdparty.sh Outdated
Comment thread thirdparty/patches/apache-arrow-17.0.0-paimon.patch Outdated
### What problem does this PR solve?

Issue Number: None

Related PR: apache#66546

Problem Summary: The branch-4.1 BE UT job can consume the master automation prebuilt, whose unversioned Arrow/Paimon stack no longer satisfies the shared Arrow 17/24 layout. The download path also certified only the versioned stack, library stripping assumed lib was a symlink, and record batch readers ended early for a leading empty row group. Rebuild missing stacks in a source checkout, validate both stacks before reuse or replacement, strip explicit library directories, and skip empty row groups before reading the next batch.

### Release note

None

### Check List (For Author)

- Test: Unit Test / Manual test
    - `./thirdparty/test/arrow-paimon-lifecycle-test.sh`
    - Arrow 17 and Arrow 24 `GetRecordBatchReaderSkipsEmptyLeadingRowGroup` tests
    - `./thirdparty/build-thirdparty.sh -j 8 arrow_17 paimon_cpp_17 arrow paimon_cpp`
    - `./build-support/check-format.sh`
    - Shell syntax and `git diff --check`
- Behavior changed: Yes. Shared prebuilt reuse now requires both Arrow/Paimon stacks, and empty row groups no longer terminate the patched reader early.
- Does this need documentation: No
### What problem does this PR solve?

Issue Number: None

Related PR: apache#66546

Problem Summary: Shared Arrow/Paimon recovery could validate the default tree while BE UT consumed independently overridden ABI roots, Paimon installation depended on the platform default libdir, Arrow empty-row-group skipping left Paimon on a zero-width logical range, and archive validation accepted incomplete SDK artifacts. Select one versioned build home for all BE entrypoints, fix Paimon installation at lib64, synchronize its row-group ranges with Arrow, and validate consumed headers plus nonempty static archives before publishing or installing a prebuilt.

### Release note

None

### Check List (For Author)

- Test: Unit Test / Manual test
    - `./thirdparty/test/arrow-paimon-lifecycle-test.sh`
    - `./thirdparty/build-thirdparty.sh -j 8 arrow_17 paimon_cpp_17 arrow paimon_cpp`
    - `./thirdparty/build-thirdparty.sh -j 8 paimon_cpp_17 paimon_cpp`
    - Arrow 17 and Arrow 24 Paimon empty-row-group smoke tests with production static libraries
    - Paimon `file_reader_wrapper_test.cpp` compilation against Arrow 17 and Arrow 24
    - `./build-support/check-format.sh`
    - Shell syntax and `git diff --check`
- Behavior changed: Yes. BE build entrypoints enforce one ABI pair, shared prebuilts require consumable SDK artifacts, and Paimon skips zero-width row-group ranges.
- Does this need documentation: No
@hubgeter hubgeter closed this Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants