You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Pipe] Account asynchronous transfer memory - #19415
Under high request concurrency, a large Pipe transfer can retain serialized Thrift bodies and temporary transport or compression buffers until asynchronous callbacks complete. These allocations are not fully represented in Pipe memory accounting, so sustained transfers can exceed the configured budget.
Changes
Reserve memory before allocating serialized Thrift bodies and account for actual buffer capacity.
Track request, compression-peak, and slice/transport-copy memory during asynchronous transfers.
Release reservations on completion, transport failure, fallback, synchronous exceptions, and Error paths.
Add regression coverage for buffer growth and callback cleanup.
Example
Repeatedly transfer a tablet request larger than the configured slice threshold while RPC callbacks are delayed. Previously, each in-flight request could retain untracked request, slice, and compression buffers. The sender now reserves those buffers and releases them as callbacks terminate.
Finding: The new LZMA2 memory-accounting code references org.tukaani.xz.LZMA2Options, but node-commons did not directly declare org.tukaani:xz; Maven dependency analysis reported it as undeclared.
Fix: Added org.tukaani:xz to iotdb-core/node-commons/pom.xml.
Verification: mvn clean verify -pl iotdb-core/node-commons -am -DskipTests -Drat.skip=true passed, and the node-commons dependency check reported no problems. Tests were skipped. The first local reactor attempt stopped earlier at Apache RAT on five Go client files, so the successful retry skipped RAT to reach the target check.
Final local SHA: 6a22e8a88f1d85d62af149ae704d9052462b2ed3.
Confirmed source-branch and PR-head SHA: 6a22e8a88f1d85d62af149ae704d9052462b2ed3.
GitHub status for the new head was pending when checked.
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
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.
Problem
Under high request concurrency, a large Pipe transfer can retain serialized Thrift bodies and temporary transport or compression buffers until asynchronous callbacks complete. These allocations are not fully represented in Pipe memory accounting, so sustained transfers can exceed the configured budget.
Changes
Errorpaths.Example
Repeatedly transfer a tablet request larger than the configured slice threshold while RPC callbacks are delayed. Previously, each in-flight request could retain untracked request, slice, and compression buffers. The sender now reserves those buffers and releases them as callbacks terminate.
Validation
spotless:apply -P with-integration-tests -pl iotdb-core/datanode,iotdb-core/node-commonspassed.clean test -pl iotdb-core/datanode,iotdb-core/node-commons -ampassed: 26 tests, 0 failures, 0 errors.