PDGGK commented on PR #10532:
URL: https://github.com/apache/seatunnel/pull/10532#issuecomment-5155961961
Thanks @DanielLeens — pushed the cleanup you asked for, and rebuilt the
branch on top of current `dev` (`458cefdc5`) instead of merging into it, so the
divergence and the conflict are both gone.
Also thanks @davidzollo / @zhangshenghang — closing #11209 as a duplicate
answered the ownership question I raised on 07-25, so this PR carries the GZ
fix.
### Dropped (already on `dev`)
- `AbstractJdbcCatalog.java`
- `AbstractJdbcCatalogCloseTest.java`
#11133 (`80c003c45`) landed the same close-every-connection behaviour along
with its own `AbstractJdbcCatalogTest`, and #10530 is closed as completed.
Keeping my version would only re-add code that is already there.
### Kept (#10531)
On current `dev` the `case GZ:` branch still does
```java
GzipCompressorInputStream gzipIn =
new
GzipCompressorInputStream(hadoopFileSystemProxy.getInputStream(path));
```
with no try-with-resources, while `ZIP`, `TAR` and `TAR_GZ` directly above
it all use one — so the underlying stream is leaked once per split. The fix
wraps it the same way its neighbours are wrapped; nothing else in the branch
changes.
### Verification
`AbstractReadStrategyGzCloseTest` drives the GZ branch with a close-tracking
`FSDataInputStream` behind a mocked `HadoopFileSystemProxy`. Run locally
against this head:
- with the fix — `Tests run: 1, Failures: 0, Errors: 0`
- with `AbstractReadStrategy.java` reverted to `dev` and the test left in
place — `AssertionFailedError: GZ underlying input stream must be closed after
the read ==> expected: <true> but was: <false>`
So the test does fail without the change. `spotless:check` on
`connector-file-base` also passes.
The diff is now 2 files, +196/−15, and I have retitled the PR to match.
Ready for a CI run on the fresh head.
--
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]