MINOR: Close leaked RemoteLogManager instances in RemoteLogManagerTest - #23604
Open
unknowntpo wants to merge 2 commits into
Open
unknowntpo wants to merge 2 commits into
unknowntpo wants to merge 2 commits into
Conversation
unknowntpo
force-pushed
the
fix-rlm-test-leak
branch
from
September 28, 2026 12:44
370799b to
cc8f381
Compare
unknowntpo
marked this pull request as ready for review
September 28, 2026 12:45
chia7712
reviewed
Sep 28, 2026
| .thenReturn(fileInputStream); | ||
|
|
||
| RemoteLogManager remoteLogManager = new RemoteLogManager(config, brokerId, logDir, clusterId, time, | ||
| try (RemoteLogManager remoteLogManager = new RemoteLogManager(config, brokerId, logDir, clusterId, time, |
Member
There was a problem hiding this comment.
testFetchOffsetByTimestampWithTieredStorageDoesNotFetchIndexWhenExistsLocally and testDeletionSkippedForSegmentsBeingCopied also have leak. Would you mind fixing them in this PR?
unknowntpo
force-pushed
the
fix-rlm-test-leak
branch
from
September 28, 2026 12:54
cc8f381 to
1f4f107
Compare
testRemoteReadFetchDataInfo declared a local variable with the same name as the field, so tearDown closed the field but not the local one. Its scheduler threads and metrics outlived the test. Use try-with-resources like the other tests that build their own manager. Generated-by: Claude Fable 5.1
testFetchOffsetByTimestampWithTieredStorageDoesNotFetchIndexWhenExistsLocally and testDeletionSkippedForSegmentsBeingCopied reassigned the field without closing the manager created in setUp. Close it first, as testRLMOpsWhenMetadataIsNotReady already does. Generated-by: Claude Fable 5.1
unknowntpo
force-pushed
the
fix-rlm-test-leak
branch
from
September 28, 2026 13:03
1f4f107 to
53d48ff
Compare
liuliuOD
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three tests in
RemoteLogManagerTestleaked aRemoteLogManager, soits scheduler threads and metrics outlived the test and could interfere
with the tests that follow
Reviewers: Chia-Ping Tsai
chia7712@gmail.com, liuliu
liuliugit@gmail.com, Ken Huang s7133700@gmail.com