[Performance] Optimize tablet RPC deserialization#18248
Merged
jt2594838 merged 3 commits intoJul 20, 2026
Conversation
jt2594838
reviewed
Jul 20, 2026
jt2594838
approved these changes
Jul 20, 2026
jt2594838
pushed a commit
that referenced
this pull request
Jul 22, 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
Reduce temporary allocations in the RPC insert path
Speed up tablet deserialization
Opt-in performance UT and comparison
TabletRpcDeserializationPerformanceTestis skipped by default. It retains the correspondingorigin/masterimplementations and measures legacy/optimized paths in the same JVM with alternating order, current-thread CPU time, allocated bytes, five rounds, and median reporting.Run it manually with:
mvn test -pl iotdb-core/datanode -Dtest=TabletRpcDeserializationPerformanceTest -Diotdb.tablet.rpc.deserialization.perf.enabled=true -Diotdb.tablet.rpc.deserialization.perf.decode.iterations=10000 -Diotdb.tablet.rpc.deserialization.perf.batch.iterations=10000 -Diotdb.tablet.rpc.deserialization.perf.reuse.iterations=10000Local comparison environment: Intel Core i9-13900H, Windows, HotSpot JDK 17.0.15. The command was repeated twice; each execution used five interleaved rounds of 10,000 measured operations per path and reported the median.
origin/masterThe stable gains come from batch parsing and in-place measurement reuse. The standalone PLAIN decoder benchmark confirms the expected per-column allocation reduction, but does not show a reproducible CPU improvement on this JIT, so no decoder CPU gain is claimed here. Peak-heap deltas were omitted because they varied with GC/heap expansion; allocated bytes per operation were stable across both runs.
Compatibility and verification
This change does not modify the Thrift IDL, wire format, configuration, or public insert behavior. The external RPC service already uses the zero-copy transport for binary fields, so this PR focuses on the remaining service-layer allocations and decoding work.
Verified with:
mvn test -pl iotdb-core/node-commons -Dtest=PathUtilsTestTabletDecoderTestTabletRpcDeserializationPerformanceTest, both disabled and opt-in benchmark modesmvn spotless:apply -pl iotdb-core/node-commons,iotdb-core/datanodemvn checkstyle:check -pl iotdb-core/node-commons,iotdb-core/datanodegit diff --checkThe normal DataNode test command is currently blocked by unrelated existing compilation errors in generated Mode/Fill classes and locally installed Config APIs.
This PR has:
Key changed/added classes
ClientRPCServiceImplStatementGeneratorTabletDecoderTabletRpcDeserializationPerformanceTestPathUtils