You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "taoran92 (via GitHub)" <gi...@apache.org> on 2026/09/23 08:07:59 UTC
[PR] [benchmark] Close directory stream when loading sink configurations [paimon]
taoran92 opened a new pull request, #10138:
URL: https://github.com/apache/paimon/pull/10138
### Purpose
Closes #10137.
`Sink.load` takes an iterator from `Files.list` without closing the owning stream, leaving directory resources open after configuration loading. Wrap the stream and the existing iteration in try-with-resources so resources are released on normal completion and when file reading or YAML parsing fails.
### Tests
- `mvn -o -pl paimon-benchmark/paimon-cluster-benchmark -Pflink1 -DskipTests compile` passed, including Checkstyle and Spotless checks.
- `git diff --check` passed.
- No new automated tests were added for this resource-lifetime change.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [benchmark] Close directory stream when loading sink configurations [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #10138:
URL: https://github.com/apache/paimon/pull/10138
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [benchmark] Close directory stream when loading sink configurations [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #10138:
URL: https://github.com/apache/paimon/pull/10138#issuecomment-5805750889
This fixes a real resource-lifetime issue in the benchmark runner: `Files.list` owns a directory stream, and the new try-with-resources closes it after normal iteration and when YAML/file reading throws. The scope is small and the stream is not used after the block.
Local verification on the isolated patch: the `paimon-cluster-benchmark` module compiled with JDK 8 and `-Pflink1` (including the normal compile checks). This module has no `src/test` tree, so I could not run an existing Sink test; the PR also adds no focused runtime regression for closing the stream on an exception. The fix has end-to-end value for repeated benchmark configuration loads, and I found no blocking code issue.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org