You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "tub (via GitHub)" <gi...@apache.org> on 2026/02/05 10:47:50 UTC
[PR] [core][filesystems] Add conditional write support for S3 and Azure ABFS [paimon]
tub opened a new pull request, #7218:
URL: https://github.com/apache/paimon/pull/7218
### Purpose
Implements native conditional writes using Hadoop 3.4+ API (fs.createFile().overwrite(false).build()) which leverages `If-None-Match: *` for both AWS S3 and Azure ABFS.
Changes:
- Add FileIO.supportsConditionalWrite() and tryToWriteAtomicIfAbsent()
- S3FileIO: Override to use native conditional writes
- AzureFileIO: Override to use native conditional writes
- RenamingSnapshotCommit: Use conditional writes when available, eliminating need for metastore lock on S3/Azure
This allows S3 and Azure users to run Paimon without lock.enabled=true for safe concurrent commits.
Linked issue: close #6563
Builds on: #7187
### Tests
- paimon-common/src/test/java/org/apache/paimon/fs/FileIOTest.java (updated)
- paimon-core/src/test/java/org/apache/paimon/catalog/RenamingSnapshotCommitTest.java (new)
### API and Format
Not directly - changes default safety guarantees.
### Documentation
Added documentation covering both AWS and Azure,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core][filesystems] Add conditional write support for S3 and Azure ABFS [paimon]
Posted by "tub (via GitHub)" <gi...@apache.org>.
tub closed pull request #7218: [core][filesystems] Add conditional write support for S3 and Azure ABFS
URL: https://github.com/apache/paimon/pull/7218
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core][filesystems] Add conditional write support for S3 and Azure ABFS [paimon]
Posted by "junmuz (via GitHub)" <gi...@apache.org>.
junmuz commented on code in PR #7218:
URL: https://github.com/apache/paimon/pull/7218#discussion_r2770023666
##########
paimon-core/src/main/java/org/apache/paimon/catalog/RenamingSnapshotCommit.java:
##########
@@ -54,6 +55,17 @@ public boolean commit(Snapshot snapshot, String branch, List<PartitionStatistics
? snapshotManager.snapshotPath(snapshot.id())
: snapshotManager.copyWithBranch(branch).snapshotPath(snapshot.id());
+ // Use native conditional writes if supported
Review Comment:
I think overriding the method `tryToWriteAtomic` would be better as it is used at different places. Perhaps we can leverage the same property `fs.s3a.create.conditional.enabled` (https://github.com/apache/hadoop/blob/8222ac0f546911b387b6a141e06dd8bf5306d565/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/troubleshooting_s3a.md) for making a decision whether to use fallback.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core][filesystems] Add conditional write support for S3 and Azure ABFS [paimon]
Posted by "tub (via GitHub)" <gi...@apache.org>.
tub commented on code in PR #7218:
URL: https://github.com/apache/paimon/pull/7218#discussion_r2768350227
##########
paimon-core/src/main/java/org/apache/paimon/catalog/RenamingSnapshotCommit.java:
##########
@@ -54,6 +55,17 @@ public boolean commit(Snapshot snapshot, String branch, List<PartitionStatistics
? snapshotManager.snapshotPath(snapshot.id())
: snapshotManager.copyWithBranch(branch).snapshotPath(snapshot.id());
+ // Use native conditional writes if supported
Review Comment:
I'm not 100% sure if this is the right approach, or if we should rename `RenamingSnapshotCommit‎` given that it doesn't _always_ use rename now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core][filesystems] Add conditional write support for S3 and Azure ABFS [paimon]
Posted by "junmuz (via GitHub)" <gi...@apache.org>.
junmuz commented on code in PR #7218:
URL: https://github.com/apache/paimon/pull/7218#discussion_r2769898549
##########
paimon-core/src/main/java/org/apache/paimon/catalog/RenamingSnapshotCommit.java:
##########
@@ -54,6 +55,17 @@ public boolean commit(Snapshot snapshot, String branch, List<PartitionStatistics
? snapshotManager.snapshotPath(snapshot.id())
: snapshotManager.copyWithBranch(branch).snapshotPath(snapshot.id());
+ // Use native conditional writes if supported
Review Comment:
We also have IcebergCommitCallbacks [here](https://github.com/apache/paimon/blob/master/paimon-core/src/main/java/org/apache/paimon/iceberg/IcebergCommitCallback.java#L385), so we need to support it there as well.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core][filesystems] Add conditional write support for S3 and Azure ABFS [paimon]
Posted by "junmuz (via GitHub)" <gi...@apache.org>.
junmuz commented on code in PR #7218:
URL: https://github.com/apache/paimon/pull/7218#discussion_r2770023666
##########
paimon-core/src/main/java/org/apache/paimon/catalog/RenamingSnapshotCommit.java:
##########
@@ -54,6 +55,17 @@ public boolean commit(Snapshot snapshot, String branch, List<PartitionStatistics
? snapshotManager.snapshotPath(snapshot.id())
: snapshotManager.copyWithBranch(branch).snapshotPath(snapshot.id());
+ // Use native conditional writes if supported
Review Comment:
I think overriding the method `tryToWriteAtomic` would be better as it is used at different places. Perhaps we can leverage the same property `fs.s3a.create.conditional.enabled` (https://github.com/apache/hadoop/blob/8222ac0f546911b387b6a141e06dd8bf5306d565/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/troubleshooting_s3a.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core][filesystems] Add conditional write support for S3 and Azure ABFS [paimon]
Posted by "tub (via GitHub)" <gi...@apache.org>.
tub commented on PR #7218:
URL: https://github.com/apache/paimon/pull/7218#issuecomment-3859368712
Iterating with @junmuz on this separately, will close this out
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org