Repository navigation
[Bugfix] Reclaim RPC buffers by evicting idle clients - #18853
Merged
Merged
Conversation
jt2594838
approved these changes
Oct 15, 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.
Description
Thrift client pools can retain RPC buffers sized for earlier large frames. Although idle clients already have a one-minute eviction threshold, Commons Pool checks only three objects per eviction run by default. Large pools can therefore retain expired connections and their buffers for much longer, leaving the server unable to allocate buffers for new connections.
This change makes each eviction run check every idle client across the pool and runs the sweep every 30 seconds. The existing one-minute idle threshold remains in place. Eviction closes the pooled transport and releases its read, write, and compression buffers; active clients are unaffected.
Validation
mvn test -pl iotdb-core/node-commons -am -Dtest=ClientPoolIdleEvictionTest,ClientManagerTest,AutoResizingBufferTest -Dsurefire.failIfNoSpecifiedTests=false: passed.mvn test-compile -DskipTests: passed.mvn test-compile -DskipTests -P with-zh-locale: passed.