Caideyipi opened a new pull request, #18971: URL: https://github.com/apache/iotdb/pull/18971
## Description Backport the applicable fixes from #18918 (83d419796fb91a6cccb874414820d3865ab34b98) to `dev/1.3`. - Incremental RPC serialization only ensures capacity. Ordinary and compressed framed transports use the complete frame size to evaluate shrinking, avoiding repeated shrink/grow cycles during large transfers. Small frames, including those at or below initial capacity, can shrink excess buffers after the existing count and cooldown, with the initial capacity as the lower bound. - Count an already marked memtable towards the flush target without submitting another flush task on every memory report. A replacement memtable can be scheduled normally. Adapt the regression tests to the 1.3 APIs and retain this branch's existing largest-memtable selection and write-admission decisions. The RPC memory-budget allocation fallback and accounting tests are omitted because `dev/1.3` has no `AutoResizingBufferMemoryManager`. ## Validation - On the unmodified 1.3 implementation, the new regressions reproduced four RPC buffer failures and three duplicate-flush-submission failures. All pass with the backport. - `mvn -pl iotdb-client/service-rpc -am verify`: 15 tests passed; dependency analysis and RAT passed. - `mvn -pl iotdb-core/datanode -am test -Dtest=AutoResizingBufferTest,TElasticFramedTransportTest,SystemInfoTest,TsFileProcessorTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false`: passed, including 10 `SystemInfoTest` and 18 `TsFileProcessorTest` cases. - Spotless, Checkstyle, and `git diff --check` passed. This PR has: - [x] been self-reviewed. - [x] added comments explaining the intent of the changes. - [x] added regression tests. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
