You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "ricky2129 (via GitHub)" <gi...@apache.org> on 2026/09/17 08:40:34 UTC

[PR] [Fix][Connector-File] Clear fileSystem reference on HadoopFileSystemProxy close [seatunnel]

ricky2129 opened a new pull request, #12369:
URL: https://github.com/apache/seatunnel/pull/12369

   ### Purpose of this pull request
   
   `HadoopFileSystemProxy#close()` closes the underlying `FileSystem` but leaves the field set.
   `getFileSystem()` only re-initializes when the field is `null`, so any use of the proxy after
   `close()` hands back a closed `FileSystem` and fails with `IOException: Filesystem closed`
   rather than reconnecting. It also makes a second `close()` call operate on an
   already-closed instance.
   
   ### Changes
   
   Clear the `fileSystem` field after closing it, so a later `getFileSystem()` re-initializes.
   The assignment is in a `finally` block so it happens even if `close()` throws.
   
   ### Does this PR introduce _user-facing_ change?
   
   No.
   
   ### How was this patch tested?
   
   New `testCloseClearsFileSystemSoProxyCanBeReused` in `HadoopFileSystemProxyTest` asserts that
   `getFileSystem()` returns a different instance after `close()`. Fails before the change,
   passes after.
   


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-File] Clear fileSystem reference on HadoopFileSystemProxy close [seatunnel]

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


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Fix][Connector-File] Clear fileSystem reference on HadoopFileSystemProxy close [seatunnel]

Posted by "ricky2129 (via GitHub)" <gi...@apache.org>.
ricky2129 commented on PR #12369:
URL: https://github.com/apache/seatunnel/pull/12369#issuecomment-5711524155

   @davidzollo 
   


-- 
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@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org