test: run the libhdfs suite manually instead of in CI - #5892
Merged
Conversation
ParquetReadFromFakeHadoopFsSuite is the only suite that loads libhdfs, and libhdfs's thread-local destructor detaches Comet's own Tokio workers from the JVM (HDFS-16021), crashing the JVM on a later, unrelated suite. Move it to the existing "manual test suite" convention rather than carrying a patched copy of libhdfs in the tree. Also document HDFS support as experimental, and drop the incorrect claim that the native Iceberg reader supports HDFS-backed tables.
rich7420
approved these changes
Sep 13, 2026
rich7420
left a comment
Contributor
There was a problem hiding this comment.
@andygrove thanks for the patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Closes #5023.
Rationale for this change
This is the alternative @comphead asked for on #5890: rather than vendoring a patched
libhdfsintoComet to fix the flake, stop running the one suite that triggers it in CI and run it by hand
instead. I think that is the right call. The crash is real and the mechanism is understood, but the
fix costs us a copy of another project's C in our tree that someone then has to maintain, and HDFS
is not a direction we are investing in.
The mechanism, briefly, so the tradeoff is on the record.
libhdfsregisters a pthreadthread-local destructor that detaches the current thread from the JVM whenever it finds a cached
JNIEnv, regardless of who attached the thread. Comet attaches its own Tokio workers and detachesthem in
on_thread_stop, so on a worker that has touched HDFS theJNIEnvis freed first and thedestructor then dereferences it and jumps to address zero. That is
HDFS-16021, still open upstream. It fires when
the pooled thread exits, which is usually minutes after the HDFS read, in whatever suite happens to
be running by then — that is why it has been reading as a random
[scans]failure rather than anHDFS one, and it has cost us re-runs on several branches.
To be clear about what this does and does not do: it removes CI's exposure, it does not fix the
bug. An HDFS user running Comet can still hit it. The docs changes below are there so that is not a
surprise.
What changes are included in this PR?
ParquetReadFromFakeHadoopFsSuitemoves onto the existing "manual test suite" convention alreadyused by
ParquetReadFromS3Suite,IcebergReadFromS3SuiteandCometS3CredentialBridgeSuite: dropit from the
scansbucket in bothpr_build_linux.ymlandpr_build_macos.yml, and add it to theignore_listindev/ci/check-suites.pyso preflight stops requiring it. The suite itself isunchanged apart from a scaladoc recording why it is out of CI and the command to run it.
It is the only suite that loads
libhdfs.CometScanSchemeFallbackSuitealso exercises anhdfs://path, but it only appliesCometScanRuleto the plan and never executes, so it neverloads the library — meaning the planner-side half of the coverage, that an
hdfs://scan is stillclaimed natively instead of silently falling back, stays in CI. The comment in
CometScanRulethatpointed only at the suite being removed is updated to say which half lives where. The Rust HDFS
tests in
parquet_writer.rsare already#[ignore]d as needing a live cluster.On the docs side, the HDFS section of the data sources guide gets a warning that support is
experimental, is not covered by CI, and can crash the JVM, with links to HDFS-16021 and #5023, plus
the manual test command in the local-development section. The contributor guide gains a short note
on the
check-suites.pyignore list, which was previously undocumented.I also fixed something I ran into while checking which tests touch HDFS: the Iceberg guide lists
"Hadoop Distributed File System (HDFS)" under supported storage for the native Iceberg reader, and
that is not true.
storage_factory_foriniceberg_common.rshas arms forfile,memory,gs,ossand the s3 family only,CometScanRule.icebergReadableSchemesmirrors it, and the roadmapalready says HDFS-backed Iceberg tables are unsupported. The guide now says they fall back to Spark,
and the storage list picks up
gsandoss, which were supported but unlisted.How are these changes tested?
dev/ci/check-suites.pyanddev/ci/check-ci-config.pyboth pass, which is the check that wouldhave failed if the workflow edit and the ignore-list edit had got out of sync.
The point of the change is that the suite still works when run by hand, so I ran the documented
command against a debug build on macOS/arm64 with Spark 4.1:
Note the test was not canceled, so
hdfs-opendalwas present in the build and thelibhdfspathreally was exercised rather than skipped by the
assume../mvnw test-compileand scalastyle are clean,spotless:applyis a no-op on the result, andprettier is clean on both edited docs.
If we go with this, #5890 should close unmerged.