Skip to content

[fix](workflow) Fix BE UT macOS job failing with wrong JDK version#65796

Open
morningman wants to merge 16 commits into
apache:masterfrom
morningman:fix-be-ut-mac-jdk17-arm64
Open

[fix](workflow) Fix BE UT macOS job failing with wrong JDK version#65796
morningman wants to merge 16 commits into
apache:masterfrom
morningman:fix-be-ut-mac-jdk17-arm64

Conversation

@morningman

Copy link
Copy Markdown
Contributor

What problem does this PR solve?

Issue Number: close #xxx

Related PR: #58914

Problem Summary:

The BE UT (macOS) job fails at the JDK version check, e.g. in
https://github.com/apache/doris/actions/runs/29692786375/job/88208347509:

Check JAVA version
ERROR: The JAVA version is 25, it must be JDK-17.

Root cause: #58914 migrated the runner from the deprecated macos-13
(Intel / x64) to macos-15, which is Apple Silicon (arm64). GitHub's runner
images expose the JDK path as JAVA_HOME_<version>_<arch>, so on arm64 it is
JAVA_HOME_17_arm64, and the old JAVA_HOME_17_X64 is unset. The workflow
still read JAVA_HOME_17_X64, so JAVA_HOME became empty; the build then fell
back to the system default Java (25) and check_jdk_version failed.

Fix: read JAVA_HOME_17_arm64 with a fallback to JAVA_HOME_17_X64, keeping
the job working on Apple Silicon runners while staying compatible with Intel
ones. The trailing-slash stripping of the original is preserved.

Note: this workflow's paths-filter only triggers on be/** / gensrc/**
changes, so this PR (which only edits the workflow) will not run the macOS
BE UT job itself. The fix will be exercised by the next scheduled run or the
next PR touching BE code. The env-var resolution was verified locally for both
arm64 and x64 cases.

Release note

None

Check List (For Author)

  • Test

    • No need to test or manual test. Explain why:
      • Other reason: CI-workflow-only change; correctness verified locally by simulating the JAVA_HOME_17_arm64 / JAVA_HOME_17_X64 resolution on both architectures.
  • Behavior changed:

    • No.
  • Does this need documentation?

    • No.

@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?

morningman and others added 5 commits July 20, 2026 10:39
The `macos-15` runner (migrated to in apache#58914) is Apple Silicon (arm64),
but the workflow still read `JAVA_HOME_17_X64`, which is only set on Intel
runners. On arm64 that variable is unset, so `JAVA_HOME` became empty, the
build fell back to the system default Java (25), and `check_jdk_version`
failed with "ERROR: The JAVA version is 25, it must be JDK-17.".

Use `JAVA_HOME_17_arm64` with a fallback to `JAVA_HOME_17_X64` so the job
works on Apple Silicon runners while staying compatible with Intel ones.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
After the JDK fix the macOS BE UT job progressed to CMake configure and
failed in contrib/openblas:

    CMake Error: Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
    fatal error: 'omp.h' file not found

AppleClang does not ship an OpenMP runtime, so find_package(OpenMP) cannot
locate omp.h / libomp on its own. Install Homebrew's libomp and export the
include/lib paths via CPPFLAGS/CFLAGS/CXXFLAGS/LDFLAGS so CMake's OpenMP
detection succeeds. be/CMakeLists.txt resets CMAKE_C_FLAGS/CMAKE_CXX_FLAGS,
so EXTRA_CXX_FLAGS is additionally exported to pass the include path to the
BE build itself.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman
morningman force-pushed the fix-be-ut-mac-jdk17-arm64 branch from 74597f9 to 7e12d9a Compare July 20, 2026 02:41
With libomp available, find_package(OpenMP) succeeds, but the build then
failed to compile:

    clang++: error: unknown argument: '-Xclang -fopenmp'

be/CMakeLists.txt injects OpenMP_CXX_FLAGS globally only when PCH is enabled,
and applies AppleClang's multi-token "-Xclang -fopenmp" as a single argument
that clang rejects. Rather than change the CMake logic, disable PCH for the
macOS UT build. Targets that actually use OpenMP (faiss, openblas and
ann_index) link OpenMP::OpenMP_CXX through their own usage requirements, which
carry the correctly-split flags, include path and libomp, so PCH is not needed
for correctness here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman
morningman force-pushed the fix-be-ut-mac-jdk17-arm64 branch from 7c9f7f2 to dffe6de Compare July 20, 2026 03:13
morningman and others added 2 commits July 20, 2026 11:35
env.sh generates custom_env_mac.sh which prepends the Homebrew llvm@20 bin
dir to PATH and derives DORIS_CLANG_HOME/CC/CXX from `command -v clang`. The
workflow, however, installed llvm@16, so /opt/homebrew/opt/llvm@20/bin did not
exist and the build silently fell back to AppleClang (/usr/bin/clang).

Using AppleClang is the underlying cause of the macOS-specific failures seen
in this job: the multi-token "-Xclang -fopenmp" OpenMP flag and the
is_trivially_copyable/bit_cast compile errors in core BE headers. Install
llvm@20 so the build uses the intended toolchain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
With the intended llvm@20 toolchain, OpenMP_CXX_FLAGS is the single token
"-fopenmp", so be/CMakeLists.txt's PCH+OpenMP block applies it correctly and
the earlier "unknown argument" failure no longer occurs. The previous
ENABLE_PCH=OFF workaround (added for AppleClang) is therefore unnecessary and
made the clean build extremely slow on the 3-core runner. Drop it so PCH
speeds the build back up.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@morningman

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.

Request changes: the JDK and libomp setup now reaches the intended Java 17 and Clang/OpenMP configuration, but the job still cannot complete natively on its arm64 runner.

Critical checkpoint conclusions

  • Goal and tests: The arm64 JDK selection is correct, and prior action evidence reaches Java 17.0.19, Clang 20.1.8, and OpenMP 5.1. The workflow is not complete because it feeds x86_64 third-party library objects into a native arm64 build. No final-head run has completed final link and BE UT execution; require a clean successful rerun after the archive fix.
  • Scope and focus: The config.cpp edit is semantic no-op source churn used only to satisfy be_changes. The workflow should select its own path instead.
  • Architecture, compatibility, and parallel paths: The JAVA_HOME_17_arm64/JAVA_HOME_17_X64 fallback is sound, but the third-party archive selection is not architecture-aware. Preserve the existing master/release-branch tag logic while selecting the matching Darwin filename.
  • Concurrency, lifecycle, configuration, persistence, data, and protocol: Not involved by this patch.
  • Error handling, observability, and performance: Shell/CMake failures remain visible, and LLVM 20, libomp discovery, PCH propagation, and runtime loading are coherent. No additional performance or observability defect was substantiated.
  • Test coverage: Make workflow-only edits trigger this job, then complete a native configure, compile, link, and BE UT run on the final fixed head.
  • User focus: No additional user-provided focus was supplied; the complete two-file patch and its upstream/downstream CI paths were reviewed.

The review converged after three rounds. Every candidate was accepted, deduplicated, or dismissed with evidence, and all final-round reviewers returned NO_NEW_VALUABLE_FINDINGS for the exact comment set below.

popd

export JAVA_HOME="${JAVA_HOME_17_X64%\/}"
# macos-15 runners are Apple Silicon (arm64), so the JDK env var is

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.

macos-15 is arm64 here, but this job still downloads doris-thirdparty-prebuilt-darwin-x86_64.tar.xz at lines 91-95. The selected bundle contains x86_64 library objects while run-be-ut.sh produces native arm64 objects; Rosetta can run x86 generators but cannot link those objects into arm64 tests. Please derive the Darwin archive filename from normalized uname -m for both URL branches while preserving the current release-tag selection, then rerun through final link and tests.

Comment thread be/src/common/config.cpp
// The read size is the size of the reads sent to os.
// There is a trade off of latency and throughout, trying to keep disks busy but
// not introduce seeks. The literature seems to agree that with 8 MB reads, random
// not introduce seeks. The literature seems to agree that with 8 MB reads, random

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.

Please drop this unrelated source-comment whitespace change and make be_changes include .github/workflows/be-ut-mac.yml instead. Right now this no-op BE edit is the only reason the final-head job runs; once it is removed, future workflow-only fixes will again skip the job they change. Selecting the workflow's own path keeps the patch focused and makes these CI changes self-testing.

@hello-stephen

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

------ Round 1 ----------------------------------
============================================
q1	17759	4021	3981	3981
q2	2021	323	189	189
q3	10276	1411	823	823
q4	4683	463	341	341
q5	7520	847	556	556
q6	179	165	137	137
q7	745	826	600	600
q8	9889	1583	1535	1535
q9	6107	4345	4329	4329
q10	6846	1725	1469	1469
q11	509	345	319	319
q12	737	566	449	449
q13	18091	3286	2718	2718
q14	261	263	244	244
q15	q16	782	773	701	701
q17	1016	915	952	915
q18	6894	5808	5482	5482
q19	1487	1377	1070	1070
q20	785	709	568	568
q21	6073	2509	2467	2467
q22	412	342	299	299
Total cold run time: 103072 ms
Total hot run time: 29192 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4384	4265	4281	4265
q2	289	313	208	208
q3	4586	4906	4408	4408
q4	2050	2156	1353	1353
q5	4365	4223	4314	4223
q6	232	173	127	127
q7	1718	1967	1586	1586
q8	2536	2171	2081	2081
q9	7722	7739	7765	7739
q10	4884	4641	4201	4201
q11	589	416	380	380
q12	737	741	530	530
q13	3414	3573	3041	3041
q14	293	306	284	284
q15	q16	717	738	669	669
q17	1331	1313	1338	1313
q18	7984	7254	6845	6845
q19	1111	1098	1079	1079
q20	2193	2204	1922	1922
q21	5180	4509	4291	4291
q22	529	437	399	399
Total cold run time: 56844 ms
Total hot run time: 50944 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 177529 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit dbe57f0bd223dc1cd2a66af1b03983000ae0f922, data reload: false

query5	4353	624	480	480
query6	456	215	202	202
query7	4875	607	341	341
query8	326	183	165	165
query9	8762	4074	4024	4024
query10	465	340	306	306
query11	5930	2300	2124	2124
query12	150	99	102	99
query13	1274	604	406	406
query14	6224	5148	4858	4858
query14_1	4214	4199	4180	4180
query15	214	209	183	183
query16	994	453	428	428
query17	1093	699	555	555
query18	2432	464	325	325
query19	199	185	145	145
query20	107	103	109	103
query21	236	151	137	137
query22	13652	13608	13384	13384
query23	17251	16495	16169	16169
query23_1	16284	16418	16508	16418
query24	7576	1766	1267	1267
query24_1	1334	1276	1304	1276
query25	565	459	389	389
query26	1323	374	223	223
query27	2579	557	395	395
query28	4479	1969	1942	1942
query29	1068	632	506	506
query30	343	268	225	225
query31	1125	1094	995	995
query32	106	65	61	61
query33	520	328	259	259
query34	1190	1154	618	618
query35	771	777	680	680
query36	1195	1227	1025	1025
query37	155	113	94	94
query38	1892	1717	1648	1648
query39	874	877	853	853
query39_1	854	839	841	839
query40	258	170	150	150
query41	70	68	69	68
query42	96	91	91	91
query43	323	329	284	284
query44	1416	775	756	756
query45	208	186	177	177
query46	1051	1160	712	712
query47	2141	2134	1999	1999
query48	413	423	302	302
query49	588	422	315	315
query50	1066	455	327	327
query51	10897	11153	10917	10917
query52	89	94	82	82
query53	271	286	202	202
query54	294	249	239	239
query55	75	73	68	68
query56	328	363	296	296
query57	1306	1308	1193	1193
query58	310	283	253	253
query59	1586	1617	1405	1405
query60	335	289	263	263
query61	173	174	202	174
query62	538	497	429	429
query63	243	202	194	194
query64	2869	1065	873	873
query65	4743	4629	4613	4613
query66	1829	513	376	376
query67	29338	29249	29125	29125
query68	3204	1460	959	959
query69	406	297	251	251
query70	1051	995	929	929
query71	355	345	324	324
query72	2993	2720	2353	2353
query73	860	808	413	413
query74	5062	4915	4746	4746
query75	2501	2512	2131	2131
query76	2334	1183	746	746
query77	348	378	279	279
query78	11877	11927	11337	11337
query79	1384	1110	728	728
query80	1266	554	458	458
query81	556	339	300	300
query82	712	151	119	119
query83	368	313	301	301
query84	284	159	130	130
query85	960	611	528	528
query86	424	299	281	281
query87	1826	1840	1764	1764
query88	3717	2755	2764	2755
query89	434	377	320	320
query90	1927	198	195	195
query91	202	185	159	159
query92	63	62	54	54
query93	1654	1503	1009	1009
query94	730	349	305	305
query95	789	606	476	476
query96	1032	774	368	368
query97	2619	2641	2495	2495
query98	216	203	200	200
query99	1095	1104	976	976
Total cold run time: 263931 ms
Total hot run time: 177529 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.53 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit dbe57f0bd223dc1cd2a66af1b03983000ae0f922, data reload: false

query1	0.01	0.01	0.01
query2	0.13	0.06	0.05
query3	0.25	0.14	0.13
query4	1.61	0.14	0.14
query5	0.24	0.24	0.22
query6	1.24	1.12	1.09
query7	0.03	0.01	0.00
query8	0.06	0.04	0.04
query9	0.38	0.31	0.34
query10	0.60	0.58	0.63
query11	0.19	0.14	0.14
query12	0.18	0.14	0.14
query13	0.50	0.51	0.49
query14	1.05	1.04	1.03
query15	0.64	0.63	0.61
query16	0.33	0.32	0.35
query17	1.19	1.11	1.18
query18	0.22	0.22	0.20
query19	2.11	1.96	2.01
query20	0.02	0.01	0.01
query21	15.42	0.23	0.14
query22	4.81	0.05	0.06
query23	16.13	0.31	0.12
query24	2.96	0.44	0.34
query25	0.13	0.05	0.05
query26	0.73	0.21	0.16
query27	0.03	0.04	0.03
query28	3.52	0.95	0.54
query29	12.52	4.19	3.29
query30	0.27	0.15	0.17
query31	2.77	0.66	0.33
query32	3.22	0.62	0.50
query33	3.19	3.26	3.19
query34	15.60	4.52	3.65
query35	3.69	3.61	3.65
query36	0.58	0.46	0.45
query37	0.09	0.06	0.07
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.19	0.16	0.15
query41	0.08	0.03	0.02
query42	0.03	0.02	0.02
query43	0.04	0.03	0.04
Total cold run time: 97.08 s
Total hot run time: 25.53 s

morningman and others added 6 commits July 20, 2026 16:53
Building the BE unit tests with the macOS (arm64) toolchain failed to compile:

    error: conversion from 'long' to 'Decimal64' is ambiguous

Decimal64/Decimal128V2/Decimal128V3/Decimal256 are Decimal<T> with several
non-explicit integer constructors (Int32/Int64/Int128/UInt64/...). A bare
integer literal larger than INT_MAX has type 'long'. On Linux LP64 int64_t is
'long', so the literal matches Decimal(Int64) exactly; on macOS int64_t is
'long long', so 'long' converts equally well to several constructor parameter
types and overload resolution is ambiguous.

Wrap these literals in int64_t(...) so they match the Decimal(Int64)
constructor exactly on both platforms. This mirrors the existing convention in
other tests (e.g. jsonb_document_test.cpp, native_reader_writer_test.cpp).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The macOS job now verifies that the BE compiles on macOS instead of building
and running the unit tests. The unit tests are compiled and run locally.

Switch from run-be-ut.sh (which forces -DMAKE_TEST=ON and builds/runs the
doris_be_test binary, i.e. all of be/test) to build.sh --be, which configures
the BE with -DMAKE_TEST=OFF so nothing under be/test is compiled. The Java
extensions and cdc client are disabled since they are not relevant to a macOS
C++ build check, and -j is passed explicitly because build.sh otherwise
defaults to roughly nproc/4 jobs.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Two more occurrences of the ambiguous 'long'->Decimal64 conversion in
column_type_convert_test.cpp (functional-style casts with bare literals larger
than INT_MAX). Wrap them in int64_t(...) so they match the Decimal(Int64)
constructor exactly, as done for the other tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
RuntimeProfile::Counter has both set(int64_t) and set(double). Calling it with
an int or long literal (e.g. set(0L), set(5), set(1000L*1000L*1000L)) is
ambiguous on macOS: there int64_t is 'long long', so a 'long'/'int' argument
converts equally well to int64_t and double. On Linux int64_t is 'long', so a
'long' literal matches set(int64_t) exactly and there is no ambiguity.

Wrap the arguments in int64_t(...) so they match set(int64_t) exactly on both
platforms.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ol on libc++)

doris_be_test is compiled with -fno-access-control (be/test/CMakeLists.txt),
which is incompatible with libc++'s <ranges> header on macOS: libc++ forward
declares lazy_split_view's __outer_iterator/__inner_iterator as private and
then defines them public, and with access control disabled clang rejects this
as "redeclared with 'public' access". Any test TU that pulls in <ranges> then
fails to compile.

Remove the dependency on <ranges> from the tests:
- drop unused '#include <ranges>' (lru_queue_test, block_file_cache_test_common,
  cloud_tablet_test);
- replace the range-view usages that actually need <ranges> with plain loops:
  std::ranges::copy_if(std::views::values(...)) in the cloud tablet query tests,
  and std::ranges::for_each(std::ranges::iota_view{...}) in block_file_cache_test.

Ranges algorithms that come from <algorithm> (std::ranges::fill/find/sort/...)
are unaffected and left as-is.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ann_index_edge_case_test: RuntimeProfile::Counter::set(1000L) is ambiguous on
  macOS (int64_t is 'long long' there, so a 'long' matches both set(int64_t) and
  set(double)); wrap in int64_t(...).
- compaction_permit_limiter_test: include <thread> for std::thread, which is not
  transitively available via libc++ here.
- python_env_test: sighandler_t is a glibc-only typedef; use a plain
  void(*)(int) function pointer so it also builds on macOS (sig_t).
- inverted_index_reader_test: for std::vector<bool>, `&value` yields a
  __bit_iterator proxy, not a real pointer; copy into a local before
  reinterpret_cast<const void*>.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman
morningman requested a review from Gabriel39 as a code owner July 20, 2026 14:59
… failure

The macos-15 runners are Apple Silicon (arm64), but the BE UT job downloaded
the x86_64 prebuilt thirdparty archive. BE sources compiled fine for arm64,
but at the final link the linker ignored every x86_64 thirdparty static
library ("found architecture 'x86_64', required architecture 'arm64'") and
doris_be failed with thousands of undefined symbols (zlib, openssl, curl,
libevent, brpc/bthread, lz4, zstd, ICU, krb5, roaring, minizip, ...).

Download doris-thirdparty-prebuilt-darwin-arm64.tar.xz instead. The arm64
darwin asset is published for the automation (master) and automation-*
(branch) releases, so both download paths are switched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morningman

Copy link
Copy Markdown
Contributor Author

run buildall

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-H: Total hot run time: 29437 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpch-tools
Tpch sf100 test result on commit 06f25daeb90d53c0b67ecab931a42c6ec7cad5e3, data reload: false

------ Round 1 ----------------------------------
============================================
q1	17631	4062	4026	4026
q2	2015	337	198	198
q3	10295	1392	805	805
q4	4679	468	339	339
q5	7494	843	590	590
q6	190	170	136	136
q7	743	822	615	615
q8	9375	1608	1549	1549
q9	5564	4331	4318	4318
q10	6759	1752	1492	1492
q11	502	359	323	323
q12	761	566	448	448
q13	18093	3326	2808	2808
q14	275	267	244	244
q15	q16	796	784	710	710
q17	978	924	1050	924
q18	7012	5895	5662	5662
q19	1311	1310	1053	1053
q20	779	725	557	557
q21	5896	2640	2343	2343
q22	430	356	297	297
Total cold run time: 101578 ms
Total hot run time: 29437 ms

----- Round 2, with runtime_filter_mode=off -----
============================================
q1	4358	4290	4335	4290
q2	297	321	215	215
q3	4561	4977	4397	4397
q4	2065	2175	1363	1363
q5	4386	4249	4343	4249
q6	233	184	129	129
q7	1759	1809	1880	1809
q8	2610	2157	2150	2150
q9	8066	8163	7627	7627
q10	4681	4683	4204	4204
q11	577	416	387	387
q12	755	757	554	554
q13	3247	3673	2895	2895
q14	329	313	272	272
q15	q16	715	734	640	640
q17	1365	1360	1344	1344
q18	7843	7357	7342	7342
q19	1175	1119	1156	1119
q20	2197	2199	1939	1939
q21	5264	4500	4432	4432
q22	516	456	405	405
Total cold run time: 56999 ms
Total hot run time: 51762 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
TPC-DS: Total hot run time: 179086 ms
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/tpcds-tools
TPC-DS sf100 test result on commit 06f25daeb90d53c0b67ecab931a42c6ec7cad5e3, data reload: false

query5	4331	628	483	483
query6	486	234	218	218
query7	4875	617	375	375
query8	340	189	173	173
query9	8763	4114	4083	4083
query10	495	355	315	315
query11	5889	2331	2178	2178
query12	163	105	104	104
query13	1266	602	419	419
query14	6271	5228	4880	4880
query14_1	4266	4294	4229	4229
query15	215	207	182	182
query16	1029	487	467	467
query17	1138	747	557	557
query18	2732	467	341	341
query19	223	187	147	147
query20	110	108	112	108
query21	237	154	134	134
query22	13617	13547	13302	13302
query23	17489	16515	16110	16110
query23_1	16254	16224	16136	16136
query24	7652	1700	1271	1271
query24_1	1305	1261	1290	1261
query25	548	440	376	376
query26	1331	343	222	222
query27	2542	579	376	376
query28	4419	1968	1933	1933
query29	1041	602	484	484
query30	345	266	238	238
query31	1116	1085	975	975
query32	101	62	60	60
query33	520	322	250	250
query34	1173	1126	633	633
query35	769	781	671	671
query36	1189	1174	1027	1027
query37	157	103	98	98
query38	1883	1720	1641	1641
query39	876	878	877	877
query39_1	834	834	833	833
query40	252	166	145	145
query41	67	67	66	66
query42	94	94	126	94
query43	319	324	277	277
query44	1391	775	763	763
query45	196	188	170	170
query46	1039	1168	748	748
query47	2130	2082	1953	1953
query48	401	442	301	301
query49	568	423	303	303
query50	1056	422	328	328
query51	10844	11073	10962	10962
query52	86	87	76	76
query53	270	268	196	196
query54	291	239	236	236
query55	74	70	65	65
query56	292	304	284	284
query57	1327	1283	1187	1187
query58	312	263	264	263
query59	1522	1650	1396	1396
query60	317	269	258	258
query61	153	157	152	152
query62	550	506	429	429
query63	245	199	205	199
query64	2805	1059	902	902
query65	4717	4640	4661	4640
query66	1767	497	378	378
query67	29408	29242	29026	29026
query68	3050	1651	953	953
query69	410	296	266	266
query70	1059	930	957	930
query71	387	324	313	313
query72	3025	2687	2395	2395
query73	880	802	457	457
query74	5077	4951	4747	4747
query75	2535	2497	2133	2133
query76	2301	1174	750	750
query77	340	386	273	273
query78	11824	11636	11458	11458
query79	1214	1113	763	763
query80	601	567	460	460
query81	445	332	294	294
query82	239	156	121	121
query83	313	325	299	299
query84	293	159	131	131
query85	892	608	523	523
query86	329	284	269	269
query87	1825	1818	1760	1760
query88	3621	2750	2744	2744
query89	413	382	319	319
query90	2214	199	199	199
query91	205	185	161	161
query92	63	62	56	56
query93	1466	1430	934	934
query94	547	340	328	328
query95	808	490	479	479
query96	1060	813	348	348
query97	2641	2629	2499	2499
query98	219	211	224	211
query99	1096	1125	997	997
Total cold run time: 262201 ms
Total hot run time: 179086 ms

@hello-stephen

Copy link
Copy Markdown
Contributor
ClickBench: Total hot run time: 25.04 s
machine: 'aliyun_ecs.c7a.8xlarge_32C64G'
scripts: https://github.com/apache/doris/tree/master/tools/clickbench-tools
ClickBench test result on commit 06f25daeb90d53c0b67ecab931a42c6ec7cad5e3, data reload: false

query1	0.01	0.01	0.01
query2	0.10	0.04	0.05
query3	0.26	0.14	0.13
query4	1.61	0.14	0.14
query5	0.25	0.22	0.22
query6	1.28	1.11	1.10
query7	0.04	0.01	0.01
query8	0.05	0.04	0.03
query9	0.38	0.31	0.32
query10	0.58	0.57	0.54
query11	0.19	0.13	0.13
query12	0.19	0.14	0.14
query13	0.47	0.48	0.48
query14	1.03	1.03	1.02
query15	0.61	0.59	0.59
query16	0.31	0.31	0.34
query17	1.14	1.10	1.14
query18	0.23	0.21	0.21
query19	1.96	1.90	1.97
query20	0.02	0.01	0.02
query21	15.42	0.21	0.13
query22	4.88	0.06	0.06
query23	16.15	0.31	0.13
query24	2.88	0.42	0.33
query25	0.11	0.05	0.04
query26	0.73	0.20	0.14
query27	0.04	0.03	0.04
query28	3.57	0.90	0.52
query29	12.52	4.11	3.30
query30	0.28	0.15	0.16
query31	2.80	0.58	0.32
query32	3.22	0.59	0.49
query33	3.11	3.30	3.18
query34	15.59	4.17	3.50
query35	3.53	3.56	3.52
query36	0.54	0.43	0.40
query37	0.09	0.06	0.07
query38	0.06	0.04	0.04
query39	0.04	0.03	0.03
query40	0.18	0.16	0.16
query41	0.07	0.03	0.03
query42	0.04	0.02	0.03
query43	0.04	0.04	0.04
Total cold run time: 96.6 s
Total hot run time: 25.04 s

@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 74.99% (30521/40698)
Line Coverage 59.14% (336542/569015)
Region Coverage 55.86% (282292/505393)
Branch Coverage 57.22% (125461/219249)

@morningman

Copy link
Copy Markdown
Contributor Author

/review

The `pull_request` trigger without an explicit `types` list defaults to
[opened, synchronize, reopened], so closing and reopening a PR fires the
`reopened` event and reruns the whole BE build even when no code changed.

Drop `reopened` so only first-open and new commits trigger a run. GitHub
check results are keyed by commit SHA, which is unchanged on reopen, so
the previous run's status still satisfies required status checks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@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 74.99% (30521/40698)
Line Coverage 59.14% (336534/569015)
Region Coverage 55.85% (282284/505393)
Branch Coverage 57.22% (125455/219249)

@morningman

Copy link
Copy Markdown
Contributor Author

skip buildall

@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.

Automated review completed on f6c7fdd9ca96bf3c560fba9828d2a405e8ce2c75 — changes requested.

I found three blocking issues and left inline comments:

  1. The macOS job now uses build.sh --be, which configures MAKE_TEST=OFF, so the check builds production BE but neither builds nor executes doris_be_test.
  2. Restoring the test target still reaches libc++ <ranges> transitively through common/object_pool.h while doris_be_test applies -fno-access-control target-wide, preserving the compilation failure this PR is intended to fix.
  3. Restricting pull_request to opened and synchronize removes revalidation when an unchanged head is reopened after the base—and therefore the synthetic merge result—has changed.

Existing review context was deduplicated: I did not repeat the live comments about architecture-dependent third-party archive selection or the workflow path filter/unrelated config.cpp whitespace change. The user supplied no additional review focus.

Checkpoint conclusions:

  • Goal and proof: the individual test portability edits are mostly narrow and behavior-preserving, but the PR does not yet accomplish or prove a macOS BE unit-test repair. The required final evidence is a Darwin doris_be_test compile, link, and execution after the workflow and transitive-header issues are fixed.
  • Scope and parallel paths: PR versus schedule, reopen behavior, head checks versus the synthetic merge, master/release assets, arm64/Intel selection, run-be-ut.sh versus build.sh, the MAKE_TEST gate, monolithic/ANN targets, and every changed test hunk were checked.
  • Concurrency and lifecycle: workflow cancellation remains coherent; changed test lock scopes, proxy temporaries, signal-handler save/restore, and thread lifetimes remain sound. No production concurrency or lifecycle path changes.
  • Compatibility and correctness: no Doris runtime configuration, persistence, storage/protocol, transaction, data-write, FE/BE variable, nullable-column, or observability boundary changes. The loop rewrites preserve cardinality/work, and the explicit-width conversions preserve values and select the intended overloads.
  • Coverage and results: Linux checks cannot prove Darwin/libc++/arm64 behavior, and the current macOS job compiles no changed test source. No result file changes.

Validation was static, per the review contract: authoritative patch/blobs, build scripts/CMake, GitHub Actions logs, and PR/check APIs; no local build was run. Three review rounds converged with every candidate accepted, dismissed with evidence, or deduplicated.


on:
pull_request:
types: [opened, synchronize]

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.

[P1] Revalidate the current merge result when reopening

Required checks are attached to the head SHA, but a pull_request workflow checks out refs/pull/<n>/merge, as GitHub documents. If head H passed against base B1, the PR is closed, the base advances to B2, and the same head is reopened, the merge ref is now B2+H while the old green check still belongs to H. Dropping the default reopened event skips validation of that current merge result. Please retain reopened, or only skip after matching a successful check to the exact current merge SHA.

# macOS C++ build check), and pass -j explicitly because build.sh
# otherwise defaults to only ~nproc/4 jobs.
DISABLE_BE_JAVA_EXTENSIONS=ON DISABLE_BE_CDC_CLIENT=ON \
./build.sh --be -j "$(nproc)"

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.

[P1] Keep compiling and running the macOS unit tests

This replaces run-be-ut.sh --run with build.sh --be, but the latter hard-codes MAKE_TEST=OFF in build.sh. As a result, this check no longer builds doris_be_test or executes any BE unit test; the successful macOS run confirms make test: OFF. That also means none of this PR's Darwin-specific fixes under be/test/** are validated here. Please keep the arm64/JDK/OpenMP setup while restoring run-be-ut.sh --run, or otherwise configure MAKE_TEST=ON and execute the test binary.

RuntimeProfile::Counter* ticks_counter = profile.add_counter("ticks", TUnit::TIME_NS);
// set to 1 sec
ticks_counter->set(1000L * 1000L * 1000L);
ticks_counter->set(int64_t(1000L * 1000L * 1000L));

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.

[P1] Finish removing the libc++ <ranges> conflict

This translation unit still includes common/object_pool.h, which itself includes <ranges> and uses std::ranges::reverse_view. Because doris_be_test applies -fno-access-control target-wide, this still reaches the same libc++ access-redeclaration failure that motivated the direct <ranges> removals in this PR. The production-only workflow does not compile this path. Please remove the transitive conflict (for example, use reverse iterators in ObjectPool or scope the test flag more narrowly), then compile, link, and run doris_be_test on Darwin.

@github-actions

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: Codex completed, but no new pull request review was submitted for the current head SHA.
Workflow run: https://github.com/apache/doris/actions/runs/29813153623

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

@github-actions github-actions Bot added the approved Indicates a PR has been approved by one committer. label Jul 21, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

PR approved by anyone and no changes requested.

@morningman

Copy link
Copy Markdown
Contributor Author

/review

@github-actions

Copy link
Copy Markdown
Contributor

Codex automated review failed and did not complete.

Error: You've hit your usage limit. Visit https://chatgpt.com/codex/settings/usage to purchase more credits or try again at Jul 25th, 2026 6:03 AM.
Workflow run: https://github.com/apache/doris/actions/runs/29837406193

Please inspect the workflow logs and rerun the review after the underlying issue is resolved.

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. reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants