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

[PR] oom [hudi]

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

   ### Change Logs
   
   1.When you set the conf read.start_commit as earliest, 
   
   https://github.com/apache/hudi/blob/bb8fc3e9f632a1fc3647fda63d482849355df2b7/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/IncrementalInputSplits.java#L410-L428
   
   the method getInstantRange will return null, 
   
   https://github.com/apache/hudi/blob/bb8fc3e9f632a1fc3647fda63d482849355df2b7/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/IncrementalInputSplits.java#L289-L298
   
   which will cause all partitions and files to be loaded subsequently, which is unreasonable.
   
   2.Due to developers being accustomed to consuming Kafka, they always prefer to set the consumption starting point to last test
   
   
   ### Impact
   
   _Describe any public API or user-facing feature change or any performance impact._
   
   ### Risk level (write none, low medium or high below)
   
   _If medium or high, explain what verification was done to mitigate the risks._
   
   ### Documentation Update
   
   _Describe any necessary documentation update if there is any new feature, config, or user-facing change_
   
   - _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-6971] OOM caused by configuring read.start_commit as earliest in stream reading [hudi]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 commented on code in PR #9906:
URL: https://github.com/apache/hudi/pull/9906#discussion_r1369798151


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/IncrementalInputSplits.java:
##########
@@ -407,21 +408,23 @@ private Result getHollowInputSplits(
   }
 
   @Nullable
-  private InstantRange getInstantRange(String issuedInstant, String instantToIssue, boolean nullableBoundary) {
+  private InstantRange getInstantRange(String issuedInstant, String startInstant, String instantToIssue, boolean nullableBoundary) {
     if (issuedInstant != null) {
       // the streaming reader may record the last issued instant, if the issued instant is present,
       // the instant range should be: (issued instant, the latest instant].
       return InstantRange.builder().startInstant(issuedInstant).endInstant(instantToIssue)
           .nullableBoundary(nullableBoundary).rangeType(InstantRange.RangeType.OPEN_CLOSE).build();
-    } else if (this.conf.getOptional(FlinkOptions.READ_START_COMMIT).isPresent()) {
-      // first time consume and has a start commit
+    } else if (this.conf.getOptional(FlinkOptions.READ_START_COMMIT).isPresent()
+                && !this.conf.getString(FlinkOptions.READ_START_COMMIT).equalsIgnoreCase(FlinkOptions.START_COMMIT_LATEST)) {
+      // first time consume , consumes form earliest commit or consumes from a start commit.
       final String startCommit = this.conf.getString(FlinkOptions.READ_START_COMMIT);
       return startCommit.equalsIgnoreCase(FlinkOptions.START_COMMIT_EARLIEST)
-          ? null
+          ? InstantRange.builder().startInstant(startInstant).endInstant(instantToIssue)

Review Comment:
   Reverted this modification.



-- 
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-6971] OOM caused by configuring read.start_commit as earliest in stream reading [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20445",
       "triggerID" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24888c01d4c4fea110a130f0d17d5e3f26deaafc",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20452",
       "triggerID" : "24888c01d4c4fea110a130f0d17d5e3f26deaafc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 28cd284a93f70e853ae3d9373fd01df3aa5c12cf Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20445) 
   * 24888c01d4c4fea110a130f0d17d5e3f26deaafc Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20452) 
   
   <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-6971] OOM caused by configuring read.start_commit as earliest in stream reading [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20445",
       "triggerID" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24888c01d4c4fea110a130f0d17d5e3f26deaafc",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "24888c01d4c4fea110a130f0d17d5e3f26deaafc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 28cd284a93f70e853ae3d9373fd01df3aa5c12cf Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20445) 
   * 24888c01d4c4fea110a130f0d17d5e3f26deaafc 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-6971] OOM caused by configuring read.start_commit as earliest in stream reading [hudi]

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 commented on code in PR #9906:
URL: https://github.com/apache/hudi/pull/9906#discussion_r1369461753


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/IncrementalInputSplits.java:
##########
@@ -407,21 +408,23 @@ private Result getHollowInputSplits(
   }
 
   @Nullable
-  private InstantRange getInstantRange(String issuedInstant, String instantToIssue, boolean nullableBoundary) {
+  private InstantRange getInstantRange(String issuedInstant, String startInstant, String instantToIssue, boolean nullableBoundary) {
     if (issuedInstant != null) {
       // the streaming reader may record the last issued instant, if the issued instant is present,
       // the instant range should be: (issued instant, the latest instant].
       return InstantRange.builder().startInstant(issuedInstant).endInstant(instantToIssue)
           .nullableBoundary(nullableBoundary).rangeType(InstantRange.RangeType.OPEN_CLOSE).build();
-    } else if (this.conf.getOptional(FlinkOptions.READ_START_COMMIT).isPresent()) {
-      // first time consume and has a start commit
+    } else if (this.conf.getOptional(FlinkOptions.READ_START_COMMIT).isPresent()
+                && !this.conf.getString(FlinkOptions.READ_START_COMMIT).equalsIgnoreCase(FlinkOptions.START_COMMIT_LATEST)) {
+      // first time consume , consumes form earliest commit or consumes from a start commit.
       final String startCommit = this.conf.getString(FlinkOptions.READ_START_COMMIT);
       return startCommit.equalsIgnoreCase(FlinkOptions.START_COMMIT_EARLIEST)
-          ? null
+          ? InstantRange.builder().startInstant(startInstant).endInstant(instantToIssue)

Review Comment:
   Reading from the latest commit is the default behavior.



-- 
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-6971] OOM caused by configuring read.start_commit as earliest in stream reading [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20445",
       "triggerID" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 28cd284a93f70e853ae3d9373fd01df3aa5c12cf Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20445) 
   
   <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-6971] OOM caused by configuring read.start_commit as earliest in stream reading [hudi]

Posted by "zhuanshenbsj1 (via GitHub)" <gi...@apache.org>.
zhuanshenbsj1 closed pull request #9906: [HUDI-6971] OOM caused by configuring read.start_commit as earliest in stream reading
URL: https://github.com/apache/hudi/pull/9906


-- 
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-6971] OOM caused by configuring read.start_commit as earliest in stream reading [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20445",
       "triggerID" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "triggerType" : "PUSH"
     }, {
       "hash" : "24888c01d4c4fea110a130f0d17d5e3f26deaafc",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20452",
       "triggerID" : "24888c01d4c4fea110a130f0d17d5e3f26deaafc",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 24888c01d4c4fea110a130f0d17d5e3f26deaafc Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20452) 
   
   <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-6971] OOM caused by configuring read.start_commit as earliest in stream reading [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20445",
       "triggerID" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 28cd284a93f70e853ae3d9373fd01df3aa5c12cf Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=20445) 
   
   <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-6971] OOM caused by configuring read.start_commit as earliest in stream reading [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "28cd284a93f70e853ae3d9373fd01df3aa5c12cf",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 28cd284a93f70e853ae3d9373fd01df3aa5c12cf 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