Skip to content

[python] Fix OSS bucket-in-endpoint mode (PyArrow < 16) corrupting directories via CreateBucket#8710

Merged
JingsongLi merged 1 commit into
apache:masterfrom
plusplusjiajia:jiajia/pypaimon-oss-legacy-pyarrow6-fix
Jul 23, 2026
Merged

[python] Fix OSS bucket-in-endpoint mode (PyArrow < 16) corrupting directories via CreateBucket#8710
JingsongLi merged 1 commit into
apache:masterfrom
plusplusjiajia:jiajia/pypaimon-oss-legacy-pyarrow6-fix

Conversation

@plusplusjiajia

@plusplusjiajia plusplusjiajia commented Jul 17, 2026

Copy link
Copy Markdown
Member

Purpose

In OSS bucket-in-endpoint mode, PyArrow parses the first key segment as a
bucket name, so bucket-level operations target the wrong bucket. (#8695
corrected this mode's boundary from PyArrow < 7 to < 16 and made OSS usable
on 7–15, widening the exposure; this PR rebases on it and keys off the same
_oss_bucket_in_endpoint flag.)

  • mkdirs() issued CreateBucket for the database directory, leaving a stray
    object that blocks all later create-table mkdirs (ParentNotDirectoryException).
    Now a no-op; a missing bucket is still surfaced by a one-time, lock-serialized
    bucket-root probe (rejects only on an OSS NoSuchBucket body, fails open
    otherwise; probe lock excluded from pickling).
  • list_status() now fails fast pointing to pyarrow >= 16 or the jindo
    backend, instead of a misleading NoSuchKey error.
  • exists() on directories can't be fixed (PyArrow strips marker trailing
    slashes); documented as a known limitation.

Modern mode (pyarrow >= 16) is unchanged.

Tests

oss_legacy_mode_test.py (13 tests, no credentials) under a tripwire that
fails any unmocked HTTP probe, on pyarrow 6.0.1 and 19.0.1. Verified live
against managed OSS with pyarrow 6.

API and Format

No changes.

@plusplusjiajia
plusplusjiajia force-pushed the jiajia/pypaimon-oss-legacy-pyarrow6-fix branch 3 times, most recently from f97cad2 to 5772b1f Compare July 17, 2026 09:00
@plusplusjiajia plusplusjiajia changed the title [python] Fix OSS legacy mode (PyArrow < 7) corrupting directories via… [python] Fix OSS legacy mode (PyArrow < 7) corrupting directories via CreateBucket Jul 17, 2026
@plusplusjiajia
plusplusjiajia force-pushed the jiajia/pypaimon-oss-legacy-pyarrow6-fix branch 3 times, most recently from ff0d5c8 to b010bce Compare July 17, 2026 10:06
@plusplusjiajia
plusplusjiajia marked this pull request as ready for review July 20, 2026 07:02
@JingsongLi

Copy link
Copy Markdown
Contributor

Please resolve conflicts.

@plusplusjiajia plusplusjiajia changed the title [python] Fix OSS legacy mode (PyArrow < 7) corrupting directories via CreateBucket [python] Fix OSS bucket-in-endpoint mode (PyArrow < 16) corrupting directories via CreateBucket Jul 21, 2026
@plusplusjiajia
plusplusjiajia force-pushed the jiajia/pypaimon-oss-legacy-pyarrow6-fix branch from b010bce to c4384fa Compare July 21, 2026 08:00
@plusplusjiajia

Copy link
Copy Markdown
Member Author

Please resolve conflicts.

@JingsongLi Rebased on master.

@JingsongLi

Copy link
Copy Markdown
Contributor

+1

@JingsongLi
JingsongLi merged commit 179abba into apache:master Jul 23, 2026
7 checks passed
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