DanielLeens commented on issue #10999:
URL: https://github.com/apache/seatunnel/issues/10999#issuecomment-4609603108

   Thanks for the clear write-up.
   
   I checked the current MongoDB source reader path in `dev`, and this does 
look like a real connector bug.
   
   The problematic path is that `MongodbReader.pollNext()` always runs 
`closeCurrentSplit()` in the `finally` block, but `closeCurrentSplit()` 
currently requires `cursor` to be non-null before closing it. So if 
`getCursor(...)` fails during cursor creation, the original MongoDB exception 
gets masked by a later `NullPointerException` from the cleanup path instead of 
surfacing to the user.
   
   So the direction in this issue is correct: the close path should be 
null-safe, and the original cursor-creation failure should remain visible in 
the logs.
   
   As a temporary workaround, you can still debug the underlying MongoDB 
connection / auth / query failure outside this masking path first, but the 
masking behavior itself should be fixed in the connector.
   
   We've labeled this as `bug` and `help wanted` — contributions are very 
welcome if you'd like to take it on.
   
   cc @chl-wxp


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