Skip to content

Commit aaee634

Browse files
author
Rafał Hibner
committed
Merge branch 'SourceNodeFixPauseAfterStop' into combined3
2 parents cb4af5a + dd5bd76 commit aaee634

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+373
-694
lines changed

.github/workflows/cpp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ jobs:
9393
image: ubuntu-cpp-sanitizer
9494
llvm: 14
9595
runs-on: ubuntu-latest
96-
title: AMD64 Ubuntu 22.04 C++ ASAN UBSAN
97-
ubuntu: 22.04
96+
title: AMD64 Ubuntu 24.04 C++ ASAN UBSAN
97+
ubuntu: 24.04
9898
- arch: arm64v8
9999
clang-tools: 14
100100
image: ubuntu-cpp

ci/docker/python-free-threaded-wheel-manylinux-test-unittests.dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@ ENV PATH "${ARROW_PYTHON_VENV}/bin:${PATH}"
4141

4242
# pandas doesn't provide wheels for aarch64 yet, so we have to install nightly Cython
4343
# along with the rest of pandas' build dependencies and disable build isolation
44-
COPY python/requirements-wheel-test.txt /arrow/python/
4544
RUN python -m pip install \
4645
--pre \
4746
--prefer-binary \
4847
--extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" \
4948
Cython numpy
5049
RUN python -m pip install "meson-python==0.13.1" "meson==1.2.1" wheel "versioneer[toml]" ninja
51-
RUN python -m pip install --no-build-isolation -r /arrow/python/requirements-wheel-test.txt

ci/docker/python-free-threaded-wheel-musllinux-test-unittests.dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,9 @@ RUN cp /usr/share/zoneinfo/Etc/UTC /etc/localtime
5656

5757
# pandas doesn't provide wheels for aarch64 yet, so we have to install nightly Cython
5858
# along with the rest of pandas' build dependencies and disable build isolation
59-
COPY python/requirements-wheel-test.txt /arrow/python/
6059
RUN python -m pip install \
6160
--pre \
6261
--prefer-binary \
6362
--extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" \
6463
Cython numpy
6564
RUN python -m pip install "meson-python==0.13.1" "meson==1.2.1" wheel "versioneer[toml]" ninja
66-
RUN python -m pip install --no-build-isolation -r /arrow/python/requirements-wheel-test.txt

ci/docker/ubuntu-22.04-cpp.dockerfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ RUN /arrow/ci/scripts/install_minio.sh latest /usr/local
173173
COPY ci/scripts/install_gcs_testbench.sh /arrow/ci/scripts/
174174
RUN /arrow/ci/scripts/install_gcs_testbench.sh default
175175

176-
COPY ci/scripts/install_azurite.sh /arrow/ci/scripts/
177-
RUN /arrow/ci/scripts/install_azurite.sh
178-
179176
COPY ci/scripts/install_ceph.sh /arrow/ci/scripts/
180177
RUN /arrow/ci/scripts/install_ceph.sh
181178

ci/scripts/cpp_test.sh

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,43 +42,50 @@ if [ -z "${ARROW_DEBUG_MEMORY_POOL}" ]; then
4242
export ARROW_DEBUG_MEMORY_POOL=trap
4343
fi
4444

45+
exclude_tests=()
4546
ctest_options=()
47+
if ! type azurite >/dev/null 2>&1; then
48+
exclude_tests+=("arrow-azurefs-test")
49+
fi
4650
case "$(uname)" in
4751
Linux)
4852
n_jobs=$(nproc)
4953
;;
5054
Darwin)
5155
n_jobs=$(sysctl -n hw.ncpu)
5256
# TODO: https://github.com/apache/arrow/issues/40410
53-
exclude_tests="arrow-s3fs-test"
54-
ctest_options+=(--exclude-regex "${exclude_tests}")
57+
exclude_tests+=("arrow-s3fs-test")
5558
;;
5659
MINGW*)
5760
n_jobs=${NUMBER_OF_PROCESSORS:-1}
5861
# TODO: Enable these crashed tests.
5962
# https://issues.apache.org/jira/browse/ARROW-9072
60-
exclude_tests="gandiva-binary-test"
61-
exclude_tests="${exclude_tests}|gandiva-boolean-expr-test"
62-
exclude_tests="${exclude_tests}|gandiva-date-time-test"
63-
exclude_tests="${exclude_tests}|gandiva-decimal-single-test"
64-
exclude_tests="${exclude_tests}|gandiva-decimal-test"
65-
exclude_tests="${exclude_tests}|gandiva-filter-project-test"
66-
exclude_tests="${exclude_tests}|gandiva-filter-test"
67-
exclude_tests="${exclude_tests}|gandiva-hash-test"
68-
exclude_tests="${exclude_tests}|gandiva-if-expr-test"
69-
exclude_tests="${exclude_tests}|gandiva-in-expr-test"
70-
exclude_tests="${exclude_tests}|gandiva-internals-test"
71-
exclude_tests="${exclude_tests}|gandiva-literal-test"
72-
exclude_tests="${exclude_tests}|gandiva-null-validity-test"
73-
exclude_tests="${exclude_tests}|gandiva-precompiled-test"
74-
exclude_tests="${exclude_tests}|gandiva-projector-test"
75-
exclude_tests="${exclude_tests}|gandiva-utf8-test"
76-
ctest_options+=(--exclude-regex "${exclude_tests}")
63+
exclude_tests+=("gandiva-binary-test")
64+
exclude_tests+=("gandiva-boolean-expr-test")
65+
exclude_tests+=("gandiva-date-time-test")
66+
exclude_tests+=("gandiva-decimal-single-test")
67+
exclude_tests+=("gandiva-decimal-test")
68+
exclude_tests+=("gandiva-filter-project-test")
69+
exclude_tests+=("gandiva-filter-test")
70+
exclude_tests+=("gandiva-hash-test")
71+
exclude_tests+=("gandiva-if-expr-test")
72+
exclude_tests+=("gandiva-in-expr-test")
73+
exclude_tests+=("gandiva-internals-test")
74+
exclude_tests+=("gandiva-literal-test")
75+
exclude_tests+=("gandiva-null-validity-test")
76+
exclude_tests+=("gandiva-precompiled-test")
77+
exclude_tests+=("gandiva-projector-test")
78+
exclude_tests+=("gandiva-utf8-test")
7779
;;
7880
*)
7981
n_jobs=${NPROC:-1}
8082
;;
8183
esac
84+
if [ "${#exclude_tests[@]}" -gt 0 ]; then
85+
IFS="|"
86+
ctest_options+=(--exclude-regex "${exclude_tests[*]}")
87+
unset IFS
88+
fi
8289

8390
if [ "${ARROW_EMSCRIPTEN:-OFF}" = "ON" ]; then
8491
n_jobs=1 # avoid spurious fails on emscripten due to loading too many big executables

ci/scripts/install_azurite.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,9 @@
2020
set -e
2121

2222
node_version="$(node --version)"
23-
echo "node version = ${node_version}"
24-
25-
case "${node_version}" in
26-
v12*)
27-
# Pin azurite to 3.29.0 due to https://github.com/apache/arrow/issues/41505
28-
azurite_version=v3.29.0
29-
;;
30-
*)
31-
azurite_version=latest
32-
;;
33-
esac
23+
echo "Node.js version = ${node_version}"
3424

25+
azurite_version=latest
3526
case "$(uname)" in
3627
Darwin)
3728
npm install -g azurite@${azurite_version}
@@ -46,5 +37,4 @@ case "$(uname)" in
4637
which azurite
4738
;;
4839
esac
49-
50-
echo "azurite version = $(azurite --version)"
40+
echo "Azurite version = $(azurite --version)"

ci/scripts/python_wheel_unix_test.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,19 @@ if [ "${CHECK_WHEEL_CONTENT}" == "ON" ]; then
100100
--path "${source_dir}/python/repaired_wheels"
101101
fi
102102

103+
is_free_threaded() {
104+
python -c "import sysconfig; print('ON' if sysconfig.get_config_var('Py_GIL_DISABLED') else 'OFF')"
105+
}
106+
103107
if [ "${CHECK_UNITTESTS}" == "ON" ]; then
104108
# Install testing dependencies
105-
python -m pip install -U -r "${source_dir}/python/requirements-wheel-test.txt"
109+
if [ "$(is_free_threaded)" = "ON" ]; then
110+
echo "Free-threaded Python build detected"
111+
python -m pip install -U -r "${source_dir}/python/requirements-wheel-test-3.13t.txt"
112+
elif [ "$(is_free_threaded)" = "OFF" ]; then
113+
echo "Regular Python build detected"
114+
python -m pip install -U -r "${source_dir}/python/requirements-wheel-test.txt"
115+
fi
106116

107117
# Execute unittest, test dependencies must be installed
108118
python -c 'import pyarrow; pyarrow.create_library_symlinks()'

ci/scripts/r_windows_build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ printenv
3535
makepkg-mingw --noconfirm --noprogressbar --skippgpcheck --nocheck --syncdeps --cleanbuild
3636

3737
VERSION=$(grep Version $ARROW_HOME/r/DESCRIPTION | cut -d " " -f 2)
38-
DST_DIR="arrow-$VERSION"
38+
DST_DIR="r-libarrow-windows-x86_64-$VERSION"
3939

4040
# Collect the build artifacts and make the shape of zip file that rwinlib expects
4141
ls

cpp/src/arrow/acero/meson.build

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,11 @@ arrow_acero_lib = library(
8686
gnu_symbol_visibility: 'inlineshidden',
8787
)
8888

89-
arrow_acero_dep = declare_dependency(link_with: [arrow_acero_lib])
89+
arrow_acero_dep = declare_dependency(
90+
dependencies: [arrow_compute_dep],
91+
link_with: [arrow_acero_lib],
92+
)
93+
meson.override_dependency('arrow-acero', arrow_acero_dep)
9094

9195
arrow_acero_testing_sources = ['test_nodes.cc', 'test_util_internal.cc']
9296

@@ -148,6 +152,7 @@ foreach key, val : arrow_acero_benchmarks
148152
endforeach
149153

150154
pkg.generate(
155+
arrow_acero_lib,
151156
filebase: 'arrow-acero',
152157
name: 'Apache Arrow Acero Engine',
153158
description: 'Apache Arrow\'s Acero Engine',

cpp/src/arrow/acero/source_node.cc

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ struct SourceNode : ExecNode, public TracedNode {
238238

239239
void PauseProducing(ExecNode* output, int32_t counter) override {
240240
std::lock_guard<std::mutex> lg(mutex_);
241-
if (counter <= backpressure_counter_) {
241+
if (counter <= backpressure_counter_ || stop_requested_) {
242242
return;
243243
}
244244
backpressure_counter_ = counter;
@@ -266,11 +266,11 @@ struct SourceNode : ExecNode, public TracedNode {
266266
to_finish.MarkFinished();
267267
}
268268

269-
Status StopProducing() override {
270-
// GH-35837: ensure node is not paused
269+
Status StopProducingImpl() override {
271270
Future<> to_finish;
272271
{
273272
std::lock_guard<std::mutex> lg(mutex_);
273+
stop_requested_ = true;
274274
if (!backpressure_future_.is_finished()) {
275275
to_finish = backpressure_future_;
276276
backpressure_future_ = Future<>::MakeFinished();
@@ -279,13 +279,6 @@ struct SourceNode : ExecNode, public TracedNode {
279279
if (to_finish.is_valid()) {
280280
to_finish.MarkFinished();
281281
}
282-
// only then stop
283-
return ExecNode::StopProducing();
284-
}
285-
286-
Status StopProducingImpl() override {
287-
std::unique_lock<std::mutex> lock(mutex_);
288-
stop_requested_ = true;
289282
return Status::OK();
290283
}
291284

0 commit comments

Comments
 (0)