You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2025/04/10 07:08:32 UTC
[PR] [HUDI-9286] Fix the atomicity of archived timeline write [hudi]
danny0405 opened a new pull request, #13128:
URL: https://github.com/apache/hudi/pull/13128
### Change Logs
In rare cases, there could be existing arching file which is either committed or not. Handle the 2 cases in this PR.
### Impact
none
### Risk level (write none, low medium or high below)
none
### Documentation Update
_Describe any necessary documentation update if there is any new feature, config, or user-facing change. If not, put "none"._
- _The config description must be updated if new configs are added or the default value of the configs are changed_
- _Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
ticket number here and follow the [instruction](https://hudi.apache.org/contribute/developer-setup#website) to make
changes to the website._
### Contributor's checklist
- [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
- [ ] Change Logs and Impact were stated clearly
- [ ] Adequate tests were added if applicable
- [ ] CI passed
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-9286] Fix the atomicity of archived timeline write [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #13128:
URL: https://github.com/apache/hudi/pull/13128#issuecomment-2791770615
The related issue: https://github.com/apache/hudi/issues/13114
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-9286] Fix the atomicity of archived timeline write [hudi]
Posted by "codope (via GitHub)" <gi...@apache.org>.
codope commented on code in PR #13128:
URL: https://github.com/apache/hudi/pull/13128#discussion_r2036700134
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/timeline/versioning/v2/LSMTimelineWriter.java:
##########
@@ -116,10 +117,27 @@ public static LSMTimelineWriter getInstance(HoodieWriteConfig config, TaskContex
public void write(
List<ActiveAction> activeActions,
Option<Consumer<ActiveAction>> preWriteCallback,
- Option<Consumer<Exception>> exceptionHandler) throws HoodieCommitException {
+ Option<Consumer<Exception>> exceptionHandler) {
ValidationUtils.checkArgument(!activeActions.isEmpty(), "The instant actions to write should not be empty");
StoragePath filePath = new StoragePath(this.archivePath,
newFileName(activeActions.get(0).getInstantTime(), activeActions.get(activeActions.size() - 1).getInstantTime(), FILE_LAYER_ZERO));
+ try {
+ if (this.metaClient.getStorage().exists(filePath)) {
Review Comment:
How frequently the lsm writer is called? Little bit concerned about `exists` check on every call.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-9286] Fix the atomicity of archived timeline write [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13128:
URL: https://github.com/apache/hudi/pull/13128#issuecomment-2791773914
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aada9f8b2570747bc9b1278c3f87c690358facb9",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "aada9f8b2570747bc9b1278c3f87c690358facb9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aada9f8b2570747bc9b1278c3f87c690358facb9 UNKNOWN
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-9286] Fix the atomicity of archived timeline write [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #13128:
URL: https://github.com/apache/hudi/pull/13128
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-9286] Fix the atomicity of archived timeline write [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13128:
URL: https://github.com/apache/hudi/pull/13128#issuecomment-2792098469
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aada9f8b2570747bc9b1278c3f87c690358facb9",
"status" : "FAILURE",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=4776",
"triggerID" : "aada9f8b2570747bc9b1278c3f87c690358facb9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aada9f8b2570747bc9b1278c3f87c690358facb9 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=4776)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-9286] Fix the atomicity of archived timeline write [hudi]
Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #13128:
URL: https://github.com/apache/hudi/pull/13128#issuecomment-2791777613
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "aada9f8b2570747bc9b1278c3f87c690358facb9",
"status" : "PENDING",
"url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=4776",
"triggerID" : "aada9f8b2570747bc9b1278c3f87c690358facb9",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* aada9f8b2570747bc9b1278c3f87c690358facb9 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=4776)
<details>
<summary>Bot commands</summary>
@hudi-bot supports the following commands:
- `@hudi-bot run azure` re-run the last Azure build
</details>
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [HUDI-9286] Fix the atomicity of archived timeline write [hudi]
Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #13128:
URL: https://github.com/apache/hudi/pull/13128#discussion_r2036722159
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/timeline/versioning/v2/LSMTimelineWriter.java:
##########
@@ -116,10 +117,27 @@ public static LSMTimelineWriter getInstance(HoodieWriteConfig config, TaskContex
public void write(
List<ActiveAction> activeActions,
Option<Consumer<ActiveAction>> preWriteCallback,
- Option<Consumer<Exception>> exceptionHandler) throws HoodieCommitException {
+ Option<Consumer<Exception>> exceptionHandler) {
ValidationUtils.checkArgument(!activeActions.isEmpty(), "The instant actions to write should not be empty");
StoragePath filePath = new StoragePath(this.archivePath,
newFileName(activeActions.get(0).getInstantTime(), activeActions.get(activeActions.size() - 1).getInstantTime(), FILE_LAYER_ZERO));
+ try {
+ if (this.metaClient.getStorage().exists(filePath)) {
Review Comment:
one time for each archiving action, so should be very low frequency.
--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org