You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Zouxxyy (via GitHub)" <gi...@apache.org> on 2023/07/27 07:34:50 UTC

[GitHub] [hudi] Zouxxyy opened a new pull request, #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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

   ### Change Logs
   
   _Describe context and summary for this change. Highlight if any code was copied._
   
   ### 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


[GitHub] [hudi] danny0405 commented on a diff in pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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


##########
hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java:
##########
@@ -302,7 +302,7 @@ public static Map<String, FileStatus[]> getFilesInPartitions(HoodieEngineContext
                                                                HoodieMetadataConfig metadataConfig,
                                                                String basePathStr,
                                                                String[] partitionPaths) {
-    try (HoodieTableMetadata tableMetadata = HoodieTableMetadata.create(engineContext, metadataConfig, basePathStr, true)) {
+    try (HoodieTableMetadata tableMetadata = HoodieTableMetadata.create(engineContext, metadataConfig, basePathStr)) {

Review Comment:
   Should be fine for Flink.



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


[GitHub] [hudi] Zouxxyy closed pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

Posted by "Zouxxyy (via GitHub)" <gi...@apache.org>.
Zouxxyy closed pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata
URL: https://github.com/apache/hudi/pull/9299


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


[GitHub] [hudi] danny0405 commented on pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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

   Test have passed: https://dev.azure.com/apache-hudi-ci-org/apache-hudi-ci/_build/results?buildId=18850&view=results


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


[GitHub] [hudi] hudi-bot commented on pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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

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


[GitHub] [hudi] nsivabalan commented on a diff in pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -305,6 +305,10 @@ private Map<String, HoodieRecord<HoodieMetadataPayload>> lookupKeysFromFileSlice
       return readFromBaseAndMergeWithLogRecords(baseFileReader, sortedKeys, fullKeys, logRecords, timings, partitionName);
     } catch (IOException ioe) {
       throw new HoodieIOException("Error merging records from metadata table for  " + keys.size() + " key : ", ioe);
+    } finally {

Review Comment:
   should we move this to getRecordsByKeys and getRecordsByKeyPrefixes since thats where we call
   ```
   partitionFileSliceMap.computeIfAbsent(partitionName,
           k -> HoodieTableMetadataUtil.getPartitionLatestMergedFileSlices(metadataMetaClient, metadataFileSystemView, partitionName));
   ``` 



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


[GitHub] [hudi] hudi-bot commented on pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c6c35088da33160d1c5cb20489ce3a8def87b677",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18850",
       "triggerID" : "c6c35088da33160d1c5cb20489ce3a8def87b677",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c6c35088da33160d1c5cb20489ce3a8def87b677 Azure: [PENDING](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18850) 
   
   <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


[GitHub] [hudi] danny0405 commented on a diff in pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -305,6 +305,10 @@ private Map<String, HoodieRecord<HoodieMetadataPayload>> lookupKeysFromFileSlice
       return readFromBaseAndMergeWithLogRecords(baseFileReader, sortedKeys, fullKeys, logRecords, timings, partitionName);
     } catch (IOException ioe) {
       throw new HoodieIOException("Error merging records from metadata table for  " + keys.size() + " key : ", ioe);
+    } finally {

Review Comment:
   The current code is better, because the readers are initialized in `lookupKeysFromFileSlice`.



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


[GitHub] [hudi] danny0405 merged pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

Posted by "danny0405 (via GitHub)" <gi...@apache.org>.
danny0405 merged PR #9299:
URL: https://github.com/apache/hudi/pull/9299


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


[GitHub] [hudi] hudi-bot commented on pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "c6c35088da33160d1c5cb20489ce3a8def87b677",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18850",
       "triggerID" : "c6c35088da33160d1c5cb20489ce3a8def87b677",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * c6c35088da33160d1c5cb20489ce3a8def87b677 Azure: [FAILURE](https://dev.azure.com/apache-hudi-ci-org/785b6ef4-2f42-4a89-8f0e-5f0d7039a0cc/_build/results?buildId=18850) 
   
   <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


[GitHub] [hudi] danny0405 commented on pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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

   cc @prashantwason for the review ~


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


[GitHub] [hudi] nsivabalan commented on a diff in pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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


##########
hudi-common/src/main/java/org/apache/hudi/common/fs/FSUtils.java:
##########
@@ -302,7 +302,7 @@ public static Map<String, FileStatus[]> getFilesInPartitions(HoodieEngineContext
                                                                HoodieMetadataConfig metadataConfig,
                                                                String basePathStr,
                                                                String[] partitionPaths) {
-    try (HoodieTableMetadata tableMetadata = HoodieTableMetadata.create(engineContext, metadataConfig, basePathStr, true)) {
+    try (HoodieTableMetadata tableMetadata = HoodieTableMetadata.create(engineContext, metadataConfig, basePathStr)) {

Review Comment:
   this is used only in flink and repair tool for spark. I will let @danny0405 certify the flow for flink. 



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


[GitHub] [hudi] Zouxxyy commented on a diff in pull request #9299: [HUDI-6597] Fix closeReader in HoodieBackedTableMetadata

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


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -305,6 +305,10 @@ private Map<String, HoodieRecord<HoodieMetadataPayload>> lookupKeysFromFileSlice
       return readFromBaseAndMergeWithLogRecords(baseFileReader, sortedKeys, fullKeys, logRecords, timings, partitionName);
     } catch (IOException ioe) {
       throw new HoodieIOException("Error merging records from metadata table for  " + keys.size() + " key : ", ioe);
+    } finally {

Review Comment:
   yeah, as @danny0405 said, where to initialize and where to close
   



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