You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "cshuo (via GitHub)" <gi...@apache.org> on 2025/02/20 08:29:44 UTC

[PR] [HUDI-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

cshuo opened a new pull request, #12857:
URL: https://github.com/apache/hudi/pull/12857

   …on with async table services
   
   ### Change Logs
   
   For Flink ingestion cases the concurrency mode is single writer and with async table services, use InProcessLockProvider by default.
   
   ### Impact
   
   better lock performance.
   
   ### Risk level (write none, low medium or high below)
   
   low
   
   ### Documentation Update
   
   none
   
   ### 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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2670795673

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3738",
       "triggerID" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * db5014565159c70cbee48078c86a8d0cfd6892a6 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3738) 
   
   <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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "cshuo (via GitHub)" <gi...@apache.org>.
cshuo commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2673155185

   @CTTY thks for the context. 
   > using Inprocess lock provider may not be safe because for flink tables services will run in a different process
   
   So in this PR, only writing pipeline with async service will use InProcess lock. When users use dedicated compaction/cluster job, usually, async table services is disabled, then the lock will fallback to FS based lock provider. WDYT


-- 
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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2670985971

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3738",
       "triggerID" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * db5014565159c70cbee48078c86a8d0cfd6892a6 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3738) 
   
   <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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2671402042

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3738",
       "triggerID" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3741",
       "triggerID" : "2671398747",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * db5014565159c70cbee48078c86a8d0cfd6892a6 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3738) Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3741) 
   
   <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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "cshuo (via GitHub)" <gi...@apache.org>.
cshuo commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2671398747

   @hudi-bot run 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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [HUDI-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "cshuo (via GitHub)" <gi...@apache.org>.
cshuo commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2699773384

   I've made some research on s3 and filesystem based lock proivder. I think currently it's not feasible to implement fs lock provider on S3 based on the following infos:
   * the basic mechanism of fs lock provider: file existence checking and mutually exclusive file creating.
   * S3 does not support object locking for concurrent writers. If two PUT requests are simultaneously made to the same key, the request with the latest timestamp wins, i.e., last-writer-wins semantic.
   * S3A fs doesn't support atomic create-no-overwrite operation, which means two processes can send `fs#create(path, overwrite=false)` requests concurrently without any exception.
   
   reference:
   * https://github.com/apache/hadoop/blob/trunk/hadoop-tools/hadoop-aws/src/site/markdown/tools/hadoop-aws/index.md#how-s3a-writes-data-to-s3
   * https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html#ConsistencyModel
   
   cc @danny0405 @CTTY, please correct me if I missed something.


-- 
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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2673204852

   @CTTY @cshuo yeah, the best way is to solve fs lock provider issue on s3, the s3 file creation should be atomic already, @cshuo Can you take some time to research the fs lock provider.


-- 
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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2699820957

   Hi @cshuo , 
   
   S3 supports conditional write which is the feature we want to use for lock provider, so the last writer won't overwrite existing files. According to the documentation, we will need to use `PutObject` or `CompleteMultipartUpload` API to do that. 
   - https://aws.amazon.com/about-aws/whats-new/2024/08/amazon-s3-conditional-writes/
   
   The S3A documentation seems slightly outdated also, I have not got the chance to dive into the S3A implementation changes, but it seems going with S3 SDK is the clearest path if we want to have a S3 based lock provider.


-- 
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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "cshuo (via GitHub)" <gi...@apache.org>.
cshuo commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2699889883

   > Hi @cshuo ,
   > 
   > S3 supports conditional write which is the feature we want to use for lock provider, so the last writer won't overwrite existing files. According to the documentation, we will need to use `PutObject` or `CompleteMultipartUpload` API to do that.
   > 
   > * https://aws.amazon.com/about-aws/whats-new/2024/08/amazon-s3-conditional-writes/
   > 
   > The S3A documentation seems slightly outdated also, I have not got the chance to dive into the S3A implementation changes, but it seems going with S3 SDK is the clearest path if we want to have a S3 based lock provider.
   
   @CTTY thanks for the context, actually I just learned that there is already a FS lock provider implementation based on s3 conditional write inside OneHouse, and it's likely to be upstreamed in 1.0.2. I'll cc you then if the PR is 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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [HUDI-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2670792325

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * db5014565159c70cbee48078c86a8d0cfd6892a6 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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "hudi-bot (via GitHub)" <gi...@apache.org>.
hudi-bot commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2671587332

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3738",
       "triggerID" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "triggerType" : "PUSH"
     }, {
       "hash" : "db5014565159c70cbee48078c86a8d0cfd6892a6",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3741",
       "triggerID" : "2671398747",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * db5014565159c70cbee48078c86a8d0cfd6892a6 Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3738) Azure: [FAILURE](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=3741) 
   
   <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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "CTTY (via GitHub)" <gi...@apache.org>.
CTTY commented on PR #12857:
URL: https://github.com/apache/hudi/pull/12857#issuecomment-2672717328

   Hi @cshuo , thanks for putting out the fix. I remember @danny0405 and I had the discussion on this: using Inprocess lock provider may not be safe because tables services will run in a different process. We may need to be careful about it.
   
   An alternative would be making filesystem based lock provider work on storage like s3 and will help us better. cc @yihua 
   
   


-- 
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-9058] Use InProcessLockProvider for flink single writer ingesti… [hudi]

Posted by "cshuo (via GitHub)" <gi...@apache.org>.
cshuo closed pull request #12857: [HUDI-9058] Use InProcessLockProvider for flink single writer ingesti…
URL: https://github.com/apache/hudi/pull/12857


-- 
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