You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "mailtoboggavarapu-coder (via GitHub)" <gi...@apache.org> on 2026/08/27 14:39:19 UTC

[PR] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

mailtoboggavarapu-coder opened a new pull request, #19772:
URL: https://github.com/apache/hudi/pull/19772

   ### Describe the issue this Pull Request addresses
   
   `UtilHelpers.getJDBCSchema()` opens a JDBC `Connection` via `createConnection()` but never closes it. The connection leaks on every code path:
   
   - Normal return after fetching the schema
   - Early exit when the table does not exist
   - Any exception thrown during schema query execution
   
   For Spark jobs that call this method repeatedly (e.g., during JDBC-based schema inference at startup or on schema evolution), leaked connections accumulate and eventually exhaust the external database's connection pool.
   
   ### Summary and Changelog
   
   Wrapped the `Connection` in a try-with-resources statement so it is always closed after use, regardless of whether the schema fetch succeeds or throws. The nested `PreparedStatement` and `ResultSet` were already managed with try-with-resources; this change brings the outer `Connection` in line with the same pattern and simplifies the control flow by merging the previously separate try/catch blocks.
   
   - `UtilHelpers.java`: Replaced manual `Connection` variable with try-with-resources; merged two sequential try/catch blocks into one.
   
   ### Impact
   
   No behaviour change on the success path. Prevents JDBC connection leaks in any pipeline that uses `getJDBCSchema()` (e.g., JDBC-sourced schema inference in HoodieStreamer).
   
   ### Risk Level
   
   low — Resource-management change only; no modification to query logic, schema parsing, or error messages.
   
   ### Documentation Update
   
   none
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Enough context is provided in the sections above
   - [ ] Adequate tests were added if applicable


-- 
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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 46.67%. Comparing base ([`76b4fa4`](https://app.codecov.io/gh/apache/hudi/commit/76b4fa404c724219f657cd64b788253bb31f23a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1bc7372`](https://app.codecov.io/gh/apache/hudi/commit/1bc73721a0e2c02266ccf725640c76ddcbad3e79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 592 commits behind head on master.
   > :exclamation:  There is a different number of reports uploaded between BASE (76b4fa4) and HEAD (1bc7372). Click for more details.
   > 
   > <details><summary>HEAD has 28 uploads less than BASE</summary>
   >
   >| Flag | BASE (76b4fa4) | HEAD (1bc7372) |
   >|------|------|------|
   >|spark-client-hadoop-common|1|0|
   >|spark-scala-tests|10|0|
   >|spark-java-tests|15|0|
   >|common-and-other-modules|1|0|
   >|utilities|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #19772       +/-   ##
   =============================================
   - Coverage     68.53%   46.67%   -21.87%     
   + Complexity    28037    12880    -15157     
   =============================================
     Files          2444     1701      -743     
     Lines        134752    91851    -42901     
     Branches      16292     9989     -6303     
   =============================================
   - Hits          92356    42868    -49488     
   - Misses        35112    44564     +9452     
   + Partials       7284     4419     -2865     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [common-and-other-modules](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [flink-integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.60% <ø> (?)` | |
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.77% <ø> (-1.16%)` | :arrow_down: |
   | [spark-client-hadoop-common](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [spark-java-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [spark-scala-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [utilities](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   [see 2313 files with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19772/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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] fix(utilities): close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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


-- 
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] fix(utilities): close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `14.28571%` with `6 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 69.72%. Comparing base ([`76b4fa4`](https://app.codecov.io/gh/apache/hudi/commit/76b4fa404c724219f657cd64b788253bb31f23a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1bc7372`](https://app.codecov.io/gh/apache/hudi/commit/1bc73721a0e2c02266ccf725640c76ddcbad3e79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 592 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | 14.28% | [6 Missing :warning: ](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #19772      +/-   ##
   ============================================
   + Coverage     68.53%   69.72%   +1.18%     
   - Complexity    28037    31001    +2964     
   ============================================
     Files          2444     2678     +234     
     Lines        134752   145573   +10821     
     Branches      16292    17370    +1078     
   ============================================
   + Hits          92356   101501    +9145     
   - Misses        35112    36859    +1747     
   + Partials       7284     7213      -71     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [common-and-other-modules](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.43% <0.00%> (+6.07%)` | :arrow_up: |
   | [flink-integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.81% <ø> (?)` | |
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.77% <ø> (-1.16%)` | :arrow_down: |
   | [integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `13.54% <0.00%> (?)` | |
   | [spark-client-hadoop-common](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.53% <ø> (+2.07%)` | :arrow_up: |
   | [spark-java-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.10% <0.00%> (-7.68%)` | :arrow_down: |
   | [spark-scala-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `33.07% <0.00%> (-12.55%)` | :arrow_down: |
   | [utilities](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.35% <14.28%> (-2.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | `62.04% <14.28%> (+2.75%)` | :arrow_up: |
   
   ... and [1819 files with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19772/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `14.28571%` with `6 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 66.40%. Comparing base ([`76b4fa4`](https://app.codecov.io/gh/apache/hudi/commit/76b4fa404c724219f657cd64b788253bb31f23a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1bc7372`](https://app.codecov.io/gh/apache/hudi/commit/1bc73721a0e2c02266ccf725640c76ddcbad3e79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 592 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | 14.28% | [6 Missing :warning: ](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #19772      +/-   ##
   ============================================
   - Coverage     68.53%   66.40%   -2.14%     
   - Complexity    28037    29060    +1023     
   ============================================
     Files          2444     2591     +147     
     Lines        134752   142714    +7962     
     Branches      16292    17114     +822     
   ============================================
   + Hits          92356    94766    +2410     
   - Misses        35112    41178    +6066     
   + Partials       7284     6770     -514     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [common-and-other-modules](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.43% <0.00%> (+6.07%)` | :arrow_up: |
   | [flink-integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.81% <ø> (?)` | |
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.77% <ø> (-1.16%)` | :arrow_down: |
   | [spark-client-hadoop-common](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.53% <ø> (+2.07%)` | :arrow_up: |
   | [spark-java-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `32.23% <0.00%> (-16.55%)` | :arrow_down: |
   | [spark-scala-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [utilities](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.35% <14.28%> (-2.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | `60.58% <14.28%> (+1.29%)` | :arrow_up: |
   
   ... and [1791 files with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19772/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1bc73721a0e2c02266ccf725640c76ddcbad3e79",
       "status" : "SUCCESS",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16636",
       "triggerID" : "1bc73721a0e2c02266ccf725640c76ddcbad3e79",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1bc73721a0e2c02266ccf725640c76ddcbad3e79 Azure: [SUCCESS](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16636) 
   
   <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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1bc73721a0e2c02266ccf725640c76ddcbad3e79",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16636",
       "triggerID" : "1bc73721a0e2c02266ccf725640c76ddcbad3e79",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1bc73721a0e2c02266ccf725640c76ddcbad3e79 Azure: [PENDING](https://dev.azure.com/apachehudi/a1a51da7-8592-47d4-88dc-fd67bed336bb/_build/results?buildId=16636) 
   
   <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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `14.28571%` with `6 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 65.36%. Comparing base ([`76b4fa4`](https://app.codecov.io/gh/apache/hudi/commit/76b4fa404c724219f657cd64b788253bb31f23a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1bc7372`](https://app.codecov.io/gh/apache/hudi/commit/1bc73721a0e2c02266ccf725640c76ddcbad3e79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 592 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | 14.28% | [6 Missing :warning: ](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #19772      +/-   ##
   ============================================
   - Coverage     68.53%   65.36%   -3.17%     
   - Complexity    28037    28269     +232     
   ============================================
     Files          2444     2550     +106     
     Lines        134752   140479    +5727     
     Branches      16292    16615     +323     
   ============================================
   - Hits          92356    91831     -525     
   - Misses        35112    42109    +6997     
   + Partials       7284     6539     -745     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [common-and-other-modules](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.43% <0.00%> (+6.07%)` | :arrow_up: |
   | [flink-integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.81% <ø> (?)` | |
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.77% <ø> (-1.16%)` | :arrow_down: |
   | [spark-client-hadoop-common](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.53% <ø> (+2.07%)` | :arrow_up: |
   | [spark-java-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [spark-scala-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [utilities](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.35% <14.28%> (-2.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | `60.58% <14.28%> (+1.29%)` | :arrow_up: |
   
   ... and [1795 files with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19772/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `14.28571%` with `6 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 70.37%. Comparing base ([`76b4fa4`](https://app.codecov.io/gh/apache/hudi/commit/76b4fa404c724219f657cd64b788253bb31f23a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1bc7372`](https://app.codecov.io/gh/apache/hudi/commit/1bc73721a0e2c02266ccf725640c76ddcbad3e79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 592 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | 14.28% | [6 Missing :warning: ](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #19772      +/-   ##
   ============================================
   + Coverage     68.53%   70.37%   +1.83%     
   - Complexity    28037    30700    +2663     
   ============================================
     Files          2444     2591     +147     
     Lines        134752   142714    +7962     
     Branches      16292    17114     +822     
   ============================================
   + Hits          92356   100432    +8076     
   - Misses        35112    35181      +69     
   + Partials       7284     7101     -183     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [common-and-other-modules](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.43% <0.00%> (+6.07%)` | :arrow_up: |
   | [flink-integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.81% <ø> (?)` | |
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.77% <ø> (-1.16%)` | :arrow_down: |
   | [spark-client-hadoop-common](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.53% <ø> (+2.07%)` | :arrow_up: |
   | [spark-java-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `41.10% <0.00%> (-7.68%)` | :arrow_down: |
   | [spark-scala-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `33.07% <0.00%> (-12.55%)` | :arrow_down: |
   | [utilities](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.35% <14.28%> (-2.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | `60.58% <14.28%> (+1.29%)` | :arrow_up: |
   
   ... and [1708 files with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19772/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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] fix(utilities): close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   Thanks for the review!
   
   To confirm — yes, the merged try block still has both `catch (HoodieException e)` (rethrows as-is) and `catch (Exception e)` (wraps in `HoodieSchemaFetchException`), so exception handling is intact.
   
   On the error message: connection failures will now surface as "Unable to fetch schema from <table>" instead of "Failed to connect to jdbc" — that's a minor cosmetic change and I think the new message is acceptable since it still conveys the failure context.
   
   On `conn.close()` in the finally: try-with-resources suppresses close() exceptions when a primary exception is already being propagated, so there's no risk of masking the original failure.


-- 
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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "1bc73721a0e2c02266ccf725640c76ddcbad3e79",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "1bc73721a0e2c02266ccf725640c76ddcbad3e79",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 1bc73721a0e2c02266ccf725640c76ddcbad3e79 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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/UtilHelpers.java:
##########
@@ -520,36 +520,19 @@ private static Boolean tableExists(Connection conn, Map<String, String> options)
    * @throws Exception
    */
   public static HoodieSchema getJDBCSchema(Map<String, String> options) {

Review Comment:
   🤖 Merging the two try blocks means connection/`tableExists` failures now fall through to the single remaining `catch` and surface as "Unable to fetch schema from <table>" instead of the old "Failed to connect to jdbc" message. Since `createConnection`/`tableExists`/`conn.close()` all throw checked `SQLException` and the method has no `throws`, could you confirm the merged try still keeps a `catch (Exception e)` (and `catch (HoodieException e)`)? Also, on the success path a `conn.close()` failure would now be caught and reported as a schema-fetch failure even though the schema was fetched — worth a quick sanity check.
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag quality.</i></sub>



-- 
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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `14.28571%` with `6 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 56.55%. Comparing base ([`76b4fa4`](https://app.codecov.io/gh/apache/hudi/commit/76b4fa404c724219f657cd64b788253bb31f23a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1bc7372`](https://app.codecov.io/gh/apache/hudi/commit/1bc73721a0e2c02266ccf725640c76ddcbad3e79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 592 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | 14.28% | [6 Missing :warning: ](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (76b4fa4) and HEAD (1bc7372). Click for more details.
   > 
   > <details><summary>HEAD has 26 uploads less than BASE</summary>
   >
   >| Flag | BASE (76b4fa4) | HEAD (1bc7372) |
   >|------|------|------|
   >|spark-scala-tests|10|0|
   >|spark-java-tests|15|0|
   >|common-and-other-modules|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #19772       +/-   ##
   =============================================
   - Coverage     68.53%   56.55%   -11.99%     
   + Complexity    28037    23026     -5011     
   =============================================
     Files          2444     2433       -11     
     Lines        134752   133783      -969     
     Branches      16292    16027      -265     
   =============================================
   - Hits          92356    75663    -16693     
   - Misses        35112    51437    +16325     
   + Partials       7284     6683      -601     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [common-and-other-modules](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [flink-integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.81% <ø> (?)` | |
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.77% <ø> (-1.16%)` | :arrow_down: |
   | [spark-client-hadoop-common](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.53% <ø> (+2.07%)` | :arrow_up: |
   | [spark-java-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [spark-scala-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [utilities](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.35% <14.28%> (-2.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | `50.72% <14.28%> (-8.56%)` | :arrow_down: |
   
   ... and [2044 files with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19772/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   Pinging for committer review. `UtilHelpers.getJDBCSchema()` opens a JDBC `Connection` but never closes it — it leaks on every exit path (normal return, table-not-found, exception). Fixed by wrapping the connection in try-with-resources. One file changed, no logic change.
   
   [@danny0405](https://github.com/danny0405) [@yihua](https://github.com/yihua) [@vinothchandrasekar](https://github.com/vinothchandrasekar) [@nsivabalan](https://github.com/nsivabalan) — would appreciate a review when you get a chance. Thanks!


-- 
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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 54.39%. Comparing base ([`76b4fa4`](https://app.codecov.io/gh/apache/hudi/commit/76b4fa404c724219f657cd64b788253bb31f23a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1bc7372`](https://app.codecov.io/gh/apache/hudi/commit/1bc73721a0e2c02266ccf725640c76ddcbad3e79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 592 commits behind head on master.
   > :exclamation:  There is a different number of reports uploaded between BASE (76b4fa4) and HEAD (1bc7372). Click for more details.
   > 
   > <details><summary>HEAD has 27 uploads less than BASE</summary>
   >
   >| Flag | BASE (76b4fa4) | HEAD (1bc7372) |
   >|------|------|------|
   >|spark-scala-tests|10|0|
   >|spark-java-tests|15|0|
   >|common-and-other-modules|1|0|
   >|utilities|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #19772       +/-   ##
   =============================================
   - Coverage     68.53%   54.39%   -14.15%     
   + Complexity    28037    17346    -10691     
   =============================================
     Files          2444     1945      -499     
     Lines        134752   101709    -33043     
     Branches      16292    11496     -4796     
   =============================================
   - Hits          92356    55320    -37036     
   - Misses        35112    41444     +6332     
   + Partials       7284     4945     -2339     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [common-and-other-modules](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [flink-integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.60% <ø> (?)` | |
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.77% <ø> (-1.16%)` | :arrow_down: |
   | [spark-client-hadoop-common](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.53% <ø> (+2.07%)` | :arrow_up: |
   | [spark-java-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [spark-scala-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [utilities](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   [see 2141 files with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19772/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `14.28571%` with `6 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 69.04%. Comparing base ([`76b4fa4`](https://app.codecov.io/gh/apache/hudi/commit/76b4fa404c724219f657cd64b788253bb31f23a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1bc7372`](https://app.codecov.io/gh/apache/hudi/commit/1bc73721a0e2c02266ccf725640c76ddcbad3e79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 592 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | 14.28% | [6 Missing :warning: ](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #19772      +/-   ##
   ============================================
   + Coverage     68.53%   69.04%   +0.50%     
   - Complexity    28037    30165    +2128     
   ============================================
     Files          2444     2591     +147     
     Lines        134752   142714    +7962     
     Branches      16292    17114     +822     
   ============================================
   + Hits          92356    98533    +6177     
   - Misses        35112    37042    +1930     
   + Partials       7284     7139     -145     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [common-and-other-modules](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.43% <0.00%> (+6.07%)` | :arrow_up: |
   | [flink-integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.81% <ø> (?)` | |
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.77% <ø> (-1.16%)` | :arrow_down: |
   | [spark-client-hadoop-common](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.53% <ø> (+2.07%)` | :arrow_up: |
   | [spark-java-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `32.23% <0.00%> (-16.55%)` | :arrow_down: |
   | [spark-scala-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `33.07% <0.00%> (-12.55%)` | :arrow_down: |
   | [utilities](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.35% <14.28%> (-2.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | `60.58% <14.28%> (+1.29%)` | :arrow_up: |
   
   ... and [1753 files with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19772/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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] fix: close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 62.06%. Comparing base ([`76b4fa4`](https://app.codecov.io/gh/apache/hudi/commit/76b4fa404c724219f657cd64b788253bb31f23a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1bc7372`](https://app.codecov.io/gh/apache/hudi/commit/1bc73721a0e2c02266ccf725640c76ddcbad3e79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 592 commits behind head on master.
   > :exclamation:  There is a different number of reports uploaded between BASE (76b4fa4) and HEAD (1bc7372). Click for more details.
   > 
   > <details><summary>HEAD has 27 uploads less than BASE</summary>
   >
   >| Flag | BASE (76b4fa4) | HEAD (1bc7372) |
   >|------|------|------|
   >|spark-scala-tests|10|0|
   >|spark-java-tests|15|0|
   >|common-and-other-modules|1|0|
   >|utilities|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #19772      +/-   ##
   ============================================
   - Coverage     68.53%   62.06%   -6.47%     
   + Complexity    28037    19785    -8252     
   ============================================
     Files          2444     1945     -499     
     Lines        134752   101709   -33043     
     Branches      16292    11496    -4796     
   ============================================
   - Hits          92356    63130   -29226     
   + Misses        35112    33627    -1485     
   + Partials       7284     4952    -2332     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [common-and-other-modules](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [flink-integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.81% <ø> (?)` | |
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.77% <ø> (-1.16%)` | :arrow_down: |
   | [spark-client-hadoop-common](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.53% <ø> (+2.07%)` | :arrow_up: |
   | [spark-java-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [spark-scala-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [utilities](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   [see 2123 files with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19772/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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] fix(utilities): close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/UtilHelpers.java:
##########
@@ -520,36 +520,19 @@ private static Boolean tableExists(Connection conn, Map<String, String> options)
    * @throws Exception
    */
   public static HoodieSchema getJDBCSchema(Map<String, String> options) {
-    Connection conn;
-    String url;
-    String table;
-    boolean tableExists;
-    try {
-      conn = createConnection(options);
-      url = options.get(JDBCOptions.JDBC_URL());
-      table = options.get(JDBCOptions.JDBC_TABLE_NAME());
-      tableExists = tableExists(conn, options);
-    } catch (Exception e) {
-      throw new HoodieSchemaFetchException("Failed to connect to jdbc", e);
-    }
-
-    if (!tableExists) {
-      throw new HoodieSchemaFetchException(String.format("%s table does not exists!", table));
-    }
-
-    try {
+    String url = options.get(JDBCOptions.JDBC_URL());
+    String table = options.get(JDBCOptions.JDBC_TABLE_NAME());
+    try (Connection conn = createConnection(options)) {

Review Comment:
   Could we add a regression test that observes the `Connection` lifecycle introduced here? The existing `TestJdbcbasedSchemaProvider` checks only the returned schema (and currently catches/logs `HoodieException`), so it would still pass if this leak regressed. A tracking test driver/connection could assert `close()` after both a successful schema fetch and a failing table/schema query; those are the two paths this change is meant to protect.



-- 
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] fix(utilities): close JDBC connection in UtilHelpers.getJDBCSchema to prevent connection leak [hudi]

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

   ## [Codecov](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `14.28571%` with `6 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 76.06%. Comparing base ([`76b4fa4`](https://app.codecov.io/gh/apache/hudi/commit/76b4fa404c724219f657cd64b788253bb31f23a4?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`1bc7372`](https://app.codecov.io/gh/apache/hudi/commit/1bc73721a0e2c02266ccf725640c76ddcbad3e79?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 592 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | 14.28% | [6 Missing :warning: ](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master   #19772      +/-   ##
   ============================================
   + Coverage     68.53%   76.06%   +7.52%     
   - Complexity    28037    33701    +5664     
   ============================================
     Files          2444     2678     +234     
     Lines        134752   145573   +10821     
     Branches      16292    17370    +1078     
   ============================================
   + Hits          92356   110732   +18376     
   + Misses        35112    27126    -7986     
   - Partials       7284     7715     +431     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [common-and-other-modules](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.43% <0.00%> (+6.07%)` | :arrow_up: |
   | [flink-integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.81% <ø> (?)` | |
   | [hadoop-mr-java-client](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `43.77% <ø> (-1.16%)` | :arrow_down: |
   | [integration-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `13.54% <0.00%> (?)` | |
   | [spark-client-hadoop-common](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `50.53% <ø> (+2.07%)` | :arrow_up: |
   | [spark-java-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `51.91% <0.00%> (+3.13%)` | :arrow_up: |
   | [spark-scala-tests](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `46.44% <0.00%> (+0.82%)` | :arrow_up: |
   | [utilities](https://app.codecov.io/gh/apache/hudi/pull/19772/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `36.35% <14.28%> (-2.02%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/hudi/pull/19772?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...in/java/org/apache/hudi/utilities/UtilHelpers.java](https://app.codecov.io/gh/apache/hudi/pull/19772?src=pr&el=tree&filepath=hudi-utilities%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fhudi%2Futilities%2FUtilHelpers.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-aHVkaS11dGlsaXRpZXMvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2h1ZGkvdXRpbGl0aWVzL1V0aWxIZWxwZXJzLmphdmE=) | `62.04% <14.28%> (+2.75%)` | :arrow_up: |
   
   ... and [1735 files with indirect coverage changes](https://app.codecov.io/gh/apache/hudi/pull/19772/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   </details>
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </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