Skip to content

[chore](thirdparty) Upgrade snappy and xxhash#60519

Merged
morningman merged 2 commits into
apache:masterfrom
xylaaaaa:upgrade-snappy-xxhash
Feb 9, 2026
Merged

[chore](thirdparty) Upgrade snappy and xxhash#60519
morningman merged 2 commits into
apache:masterfrom
xylaaaaa:upgrade-snappy-xxhash

Conversation

@xylaaaaa
Copy link
Copy Markdown
Contributor

@xylaaaaa xylaaaaa commented Feb 5, 2026

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #xxx

Problem Summary:

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

Copilot AI review requested due to automatic review settings February 5, 2026 03:35
@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?

@xylaaaaa
Copy link
Copy Markdown
Contributor Author

xylaaaaa commented Feb 5, 2026

run buildall

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades two third-party dependencies: snappy from version 1.1.8 to 1.1.10, and xxhash from version 0.8.1 to 0.8.3. The upgrade includes necessary build configuration changes for snappy, including RTTI enablement and improved CMake flags, plus a new patch to fix a sign-compare compiler warning in snappy 1.1.10.

Changes:

  • Upgraded snappy dependency from 1.1.8 to 1.1.10 with updated download URL and MD5 hash
  • Upgraded xxhash dependency from 0.8.1 to 0.8.3 with updated download URL and MD5 hash
  • Added patch file for snappy 1.1.10 to fix sign-compare warning
  • Updated snappy build script to enable RTTI and use standard CMake boolean flags
  • Updated libuuid download URL to use generic SourceForge mirror
  • Updated CHANGELOG with version modifications

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
thirdparty/vars.sh Updated version numbers, download URLs, and MD5 checksums for snappy (1.1.10), xxhash (0.8.3), and libuuid download URL
thirdparty/patches/snappy-1.1.10-sign-compare.patch Added new patch to fix sign-compare compiler warning by adding explicit cast to ptrdiff_t
thirdparty/build-thirdparty.sh Modified snappy build to enable RTTI via sed, changed CMake flags from numeric (0) to boolean (OFF), added SNAPPY_BUILD_BENCHMARKS=OFF flag
thirdparty/CHANGELOG.md Added entry for version 20260202 documenting the snappy and xxhash upgrades

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread thirdparty/build-thirdparty.sh Outdated
cd "${TP_SOURCE_DIR}/${SNAPPY_SOURCE}"

# Enable RTTI for snappy (required by Doris BE for SnappySlicesSource inheritance)
sed -i 's/-fno-rtti/-frtti/g' CMakeLists.txt
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The sed command to enable RTTI is executed every time the build function runs. While this works because the source is only unpacked once, there's a potential issue: if someone manually modifies CMakeLists.txt and then reruns the build, the sed command could fail or have unexpected behavior if the pattern no longer matches.

Consider making this more robust by either:

  1. Checking if the modification has already been applied before running sed
  2. Applying this change as a proper patch in download-thirdparty.sh (similar to how other libraries are patched)

Example for option 1:

if grep -q '\-fno-rtti' CMakeLists.txt; then
    sed -i 's/-fno-rtti/-frtti/g' CMakeLists.txt
fi

Option 2 would be more consistent with how other libraries (like glog, mysql, etc.) are patched in this codebase.

Suggested change
sed -i 's/-fno-rtti/-frtti/g' CMakeLists.txt
if grep -q '\-fno-rtti' CMakeLists.txt; then
sed -i 's/-fno-rtti/-frtti/g' CMakeLists.txt
fi

Copilot uses AI. Check for mistakes.
Comment thread thirdparty/vars.sh
Comment on lines +101 to +104
SNAPPY_DOWNLOAD="https://github.com/google/snappy/archive/1.1.10.tar.gz"
SNAPPY_NAME=snappy-1.1.10.tar.gz
SNAPPY_SOURCE=snappy-1.1.10
SNAPPY_MD5SUM="70153395ebe6d72febe2cf2e40026a44"
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The LICENSE-dist.txt file still references the old versions of snappy (1.1.8) and xxhash (0.8.1) on lines 1497 and 1522 respectively. These should be updated to reflect the new versions (snappy 1.1.10 and xxhash 0.8.3) being introduced in this PR.

This file documents the versions of third-party dependencies included in the distribution and should be kept in sync with actual dependency versions.

Copilot uses AI. Check for mistakes.
}
} while (ip < ip_limit_min_slop &&
- (op + deferred_length) < op_limit_min_slop);
+ static_cast<ptrdiff_t>(op + deferred_length) < op_limit_min_slop);
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

A new patch file snappy-1.1.10-sign-compare.patch has been added, but there is no corresponding patch application logic in thirdparty/download-thirdparty.sh.

Looking at the existing pattern in download-thirdparty.sh (e.g., lines 252-269 for glog, lines 272-280 for mysql), you need to add a snappy patch section after the unpacking phase. The section should follow this pattern:

# snappy patch
if [[ " ${TP_ARCHIVES[*]} " =~ " SNAPPY " ]]; then
    if [[ "${SNAPPY_SOURCE}" == "snappy-1.1.10" ]]; then
        cd "${TP_SOURCE_DIR}/${SNAPPY_SOURCE}"
        if [[ ! -f "${PATCHED_MARK}" ]]; then
            patch -p1 <"${TP_PATCH_DIR}/snappy-1.1.10-sign-compare.patch"
            touch "${PATCHED_MARK}"
        fi
        cd -
    fi
    echo "Finished patching ${SNAPPY_SOURCE}"
fi

Without this, the patch file will not be applied during the build process, and the sign-compare issue it's meant to fix will persist.

Suggested change
+ static_cast<ptrdiff_t>(op + deferred_length) < op_limit_min_slop);
+ reinterpret_cast<ptrdiff_t>(op + deferred_length) < op_limit_min_slop);

Copilot uses AI. Check for mistakes.
Comment thread thirdparty/vars.sh

# libuuid
LIBUUID_DOWNLOAD="https://nchc.dl.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz"
LIBUUID_DOWNLOAD="https://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz"
Copy link

Copilot AI Feb 5, 2026

Choose a reason for hiding this comment

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

The libuuid download URL has been changed from a specific mirror (nchc.dl.sourceforge.net) to the generic SourceForge downloads URL (downloads.sourceforge.net). While this is a good change for reliability, it is not mentioned in the PR description or CHANGELOG. Consider either:

  1. Adding this to the CHANGELOG as a separate bullet point
  2. Mentioning it in the PR description

This helps with transparency and makes it easier to track what changed in this version.

Copilot uses AI. Check for mistakes.
@doris-robot
Copy link
Copy Markdown

TPC-H: Total hot run time: 31212 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 9fb89381e030744c65fafc1d747a6ec831ea8fe2, data reload: false

------ Round 1 ----------------------------------
q1	17596	4512	4332	4332
q2	2007	377	230	230
q3	10138	1269	746	746
q4	10224	886	313	313
q5	7551	2174	1864	1864
q6	192	180	151	151
q7	860	731	612	612
q8	9265	1391	1092	1092
q9	5197	4838	4853	4838
q10	6853	1957	1544	1544
q11	492	288	301	288
q12	332	373	225	225
q13	17792	4028	3216	3216
q14	230	235	223	223
q15	891	835	808	808
q16	686	683	609	609
q17	640	849	434	434
q18	6619	6582	6638	6582
q19	1242	1011	653	653
q20	404	353	259	259
q21	2702	2122	1910	1910
q22	353	322	283	283
Total cold run time: 102266 ms
Total hot run time: 31212 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4359	4337	4368	4337
q2	259	344	255	255
q3	2110	2572	2273	2273
q4	1398	1744	1358	1358
q5	4462	4422	4557	4422
q6	203	181	139	139
q7	1873	1848	2019	1848
q8	2621	2505	2581	2505
q9	7624	7843	7613	7613
q10	2870	3022	2613	2613
q11	558	474	452	452
q12	651	754	605	605
q13	3957	4340	3587	3587
q14	302	303	298	298
q15	895	813	797	797
q16	680	738	690	690
q17	1212	1425	1397	1397
q18	8308	8102	7780	7780
q19	908	866	816	816
q20	2148	2220	2040	2040
q21	4525	4238	4134	4134
q22	614	553	501	501
Total cold run time: 52537 ms
Total hot run time: 50460 ms

@doris-robot
Copy link
Copy Markdown

ClickBench: Total hot run time: 28.72 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 9fb89381e030744c65fafc1d747a6ec831ea8fe2, data reload: false

query1	0.06	0.06	0.06
query2	0.09	0.05	0.06
query3	0.26	0.09	0.09
query4	1.61	0.11	0.12
query5	0.26	0.26	0.25
query6	1.17	0.67	0.68
query7	0.04	0.04	0.03
query8	0.06	0.04	0.04
query9	0.58	0.51	0.49
query10	0.54	0.54	0.56
query11	0.15	0.10	0.10
query12	0.15	0.11	0.11
query13	0.63	0.62	0.63
query14	1.07	1.05	1.06
query15	0.87	0.86	0.87
query16	0.41	0.40	0.40
query17	1.11	1.12	1.10
query18	0.23	0.21	0.21
query19	2.07	1.97	2.06
query20	0.03	0.02	0.01
query21	15.41	0.24	0.15
query22	5.26	0.06	0.05
query23	15.99	0.30	0.11
query24	1.44	0.69	0.59
query25	0.10	0.09	0.05
query26	0.14	0.13	0.15
query27	0.06	0.08	0.05
query28	4.08	1.16	0.96
query29	12.57	3.89	3.15
query30	0.31	0.16	0.15
query31	2.82	0.67	0.40
query32	3.24	0.59	0.50
query33	3.21	3.23	3.30
query34	16.04	5.36	4.74
query35	4.82	4.80	4.89
query36	0.64	0.50	0.49
query37	0.11	0.08	0.08
query38	0.08	0.04	0.04
query39	0.05	0.03	0.03
query40	0.20	0.17	0.16
query41	0.09	0.04	0.03
query42	0.04	0.03	0.03
query43	0.05	0.04	0.04
Total cold run time: 98.14 s
Total hot run time: 28.72 s

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.55% (19369/36858)
Line Coverage 36.03% (179873/499220)
Region Coverage 32.40% (139462/430425)
Branch Coverage 33.40% (60389/180812)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.60% (25865/36122)
Line Coverage 54.22% (270022/498025)
Region Coverage 51.78% (225150/434841)
Branch Coverage 53.15% (96482/181542)

@xylaaaaa
Copy link
Copy Markdown
Contributor Author

xylaaaaa commented Feb 5, 2026

run buildall

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Feb 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 5, 2026

PR approved by at least one committer and no changes requested.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 5, 2026

PR approved by anyone and no changes requested.

@doris-robot
Copy link
Copy Markdown

TPC-H: Total hot run time: 31286 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 3624c195b20781d0dfa21019cb0ad8e2f33d99a1, data reload: false

------ Round 1 ----------------------------------
q1	17649	4454	4289	4289
q2	2067	361	232	232
q3	10100	1266	707	707
q4	10195	830	314	314
q5	7522	2233	1864	1864
q6	199	178	144	144
q7	879	726	589	589
q8	9277	1434	1089	1089
q9	5198	4817	4770	4770
q10	6766	1954	1579	1579
q11	529	285	285	285
q12	353	370	221	221
q13	17788	4080	3235	3235
q14	239	239	220	220
q15	882	819	790	790
q16	657	674	616	616
q17	637	777	510	510
q18	6733	6531	7223	6531
q19	1251	1074	651	651
q20	400	375	249	249
q21	2968	2398	2108	2108
q22	385	319	293	293
Total cold run time: 102674 ms
Total hot run time: 31286 ms

----- Round 2, with runtime_filter_mode=off -----
q1	4511	4506	4740	4506
q2	258	363	279	279
q3	2294	2965	2401	2401
q4	1474	1859	1386	1386
q5	4594	4459	4558	4459
q6	238	185	139	139
q7	2046	1883	1813	1813
q8	2593	2476	2414	2414
q9	7724	7303	7514	7303
q10	2967	3052	2576	2576
q11	579	481	474	474
q12	681	829	669	669
q13	3896	4336	3568	3568
q14	316	298	270	270
q15	828	805	782	782
q16	652	690	642	642
q17	1080	1310	1248	1248
q18	7705	7460	7350	7350
q19	843	782	799	782
q20	1965	2009	1867	1867
q21	4616	4252	4068	4068
q22	557	550	493	493
Total cold run time: 52417 ms
Total hot run time: 49489 ms

@doris-robot
Copy link
Copy Markdown

ClickBench: Total hot run time: 28.78 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 3624c195b20781d0dfa21019cb0ad8e2f33d99a1, data reload: false

query1	0.05	0.05	0.06
query2	0.10	0.04	0.05
query3	0.26	0.09	0.08
query4	1.61	0.12	0.11
query5	0.26	0.25	0.24
query6	1.17	0.68	0.66
query7	0.03	0.03	0.03
query8	0.05	0.04	0.04
query9	0.57	0.51	0.48
query10	0.56	0.56	0.54
query11	0.15	0.10	0.10
query12	0.15	0.10	0.10
query13	0.64	0.60	0.62
query14	1.07	1.05	1.05
query15	0.87	0.87	0.86
query16	0.39	0.39	0.40
query17	1.14	1.14	1.13
query18	0.23	0.21	0.21
query19	2.09	2.01	2.03
query20	0.02	0.02	0.01
query21	15.43	0.29	0.16
query22	5.15	0.06	0.06
query23	16.18	0.29	0.11
query24	1.49	0.76	0.63
query25	0.12	0.08	0.11
query26	0.15	0.14	0.13
query27	0.10	0.05	0.08
query28	5.33	1.15	0.97
query29	12.54	3.97	3.19
query30	0.28	0.13	0.11
query31	2.82	0.65	0.40
query32	3.23	0.58	0.49
query33	3.22	3.25	3.22
query34	15.98	5.38	4.78
query35	4.81	4.78	4.80
query36	0.66	0.51	0.49
query37	0.10	0.07	0.06
query38	0.07	0.05	0.05
query39	0.05	0.04	0.04
query40	0.19	0.16	0.16
query41	0.09	0.04	0.03
query42	0.04	0.03	0.03
query43	0.05	0.04	0.03
Total cold run time: 99.49 s
Total hot run time: 28.78 s

@hello-stephen
Copy link
Copy Markdown
Contributor

BE UT Coverage Report

Increment line coverage 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 52.55% (19372/36861)
Line Coverage 36.04% (179925/499278)
Region Coverage 32.39% (139431/430460)
Branch Coverage 33.40% (60407/180838)

@hello-stephen
Copy link
Copy Markdown
Contributor

BE Regression && UT Coverage Report

Increment line coverage 100% (0/0) 🎉

Increment coverage report
Complete coverage report

Category Coverage
Function Coverage 71.58% (25858/36124)
Line Coverage 54.22% (270062/498090)
Region Coverage 51.75% (225064/434878)
Branch Coverage 53.16% (96525/181570)

@morningman morningman merged commit 3afa267 into apache:master Feb 9, 2026
29 of 30 checks passed
xylaaaaa added a commit to xylaaaaa/doris that referenced this pull request Mar 16, 2026
morningman pushed a commit that referenced this pull request Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by one committer. dev/4.1.0-merged reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants