voonhous opened a new issue, #19635:
URL: https://github.com/apache/hudi/issues/19635

   **Describe the problem**
   
   Two bugs in `ValidateHoodieSyncProcedure` (`sync_validate`):
   
   1. `countNewRecords` reconstructs each catch-up instant hardcoding 
`HoodieTimeline.COMMIT_ACTION`, but the catch-up list comes from 
`getCommitsTimeline` (includes deltacommits) and is resolved against 
`getCommitAndReplaceTimeline`. Any MOR target, or a target with a 
`replacecommit` (clustering / insert overwrite) in the catch-up range, fails to 
read the instant file. Present since #6200.
   2. In the JDBC count path, `finally { conn.close() }` runs with `conn == 
null` when `DriverManager.getConnection` fails, so the real `SQLException` is 
masked by an NPE. The sibling overload in the same file guards with `if (conn 
!= null)` -- clearly an oversight.
   
   **Suggested fix**
   
   Carry the actual `HoodieInstant` from `commitsToCatchup` instead of 
synthesizing a COMMIT instant; null-guard the `finally`. Cheap regression 
tests: a MOR variant of the catch-up test in `TestValidateHoodieSyncProcedure` 
(added in #19161), and `mode => 'complete'` with an unreachable JDBC URL 
asserting a connection error rather than an NPE.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to