voonhous commented on code in PR #19642:
URL: https://github.com/apache/hudi/pull/19642#discussion_r3794226907


##########
hudi-trino/src/main/java/io/trino/plugin/hudi/HudiSplitSource.java:
##########
@@ -188,7 +168,13 @@ public void close()
     @Override
     public boolean isFinished()
     {
-        return splitLoaderFuture.isDone() && queue.isFinished();
+        return finished.get() || (splitLoaderFuture.isDone() && 
queue.isFinished());

Review Comment:
   Real bug, and pre-existing (the old `isFinished` had the same shape) -- but 
the batch rewrite was the right time to catch it. Fixed in 651552d59bd5: 
`isFinished()` now reports unfinished while `trinoException` is pending, so the 
engine polls once more and `getNextBatch` surfaces the failure. Ordering is 
safe: the failure callback sets the exception before `queue.finish()`, so once 
the queue reports finished the exception is visible.
   



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