Skip to content

Conversation

@JackieTien97
Copy link
Contributor

No description provided.

Caideyipi and others added 12 commits December 10, 2025 19:40
…6853)

* Fix excessive GC caused by loading too many TsFiles at once

When loading multiple TsFiles, all file resources were loaded into memory
simultaneously, causing excessive memory consumption and frequent GC pauses.

This commit introduces batch execution for multi-file loading scenarios:

1. Split LoadTsFileStatement/LoadTsFile into sub-statements, each handling
   one TsFile, to avoid loading all file resources at once
2. Refactor duplicate code in ClientRPCServiceImpl by extracting helper
   methods for both tree model and table model
3. Add progress logging to track the loading status of each file
4. Support both synchronous and asynchronous loading modes

Changes:
- Added getSubStatement() method to LoadTsFileStatement and LoadTsFile
  for splitting multi-file statements
- Extracted shouldSplitLoadTsFileStatement() and shouldSplitTableLoadTsFile()
  to determine if splitting is needed
- Extracted executeBatchLoadTsFile() and executeBatchTableLoadTsFile()
  to handle batch execution with progress logging
- Applied the optimization to 4 execution paths (tree/table model,
  sync/async loading)

This fix significantly reduces memory pressure and improves system
stability when loading large numbers of TsFiles.

* fix

* update

(cherry picked from commit bc4f8e9)
…conversion to TableStatement. (#16844)

* Pipe: Modify the TableRawReq deserialization method to support direct conversion to TableStatement.

* fix

* fix

* fix

* fix

* fix

* update

* update

* update

* refactor: optimize TabletStatementConverter according to code review

- Optimize times array copy: skip copy when lengths are equal, use System.arraycopy
- Add warning logs when times array is null or too small
- Ensure all arrays (values, times, bitMaps) are copied to rowSize length for immutability
- Filter out null columns when converting Statement to Tablet
- Rename idColumnIndices to tagColumnIndices
- Add skipString method to avoid constructing temporary objects
- Add comments explaining skipped fields in readMeasurement
- Use direct buffer position increment instead of reading bytes for skipping
- Ensure all column values are copied to ensure immutability

* update

* update

(cherry picked from commit 13b0582)
…aNode first startup (#16854)

* Add cleanup for active load listening directories on DataNode first startup

- Add cleanupListeningDirectories() method in ActiveLoadAgent to clean up all listening directories
- Call cleanup method when DataNode starts for the first time
- Clean up pending, pipe, and failed directories
- Silent execution with minimal logging

* update

* fix

(cherry picked from commit bfa71e0)
…an't rename file successfully (#16889)

(cherry picked from commit 4a481f0)
…can't rename file successfully. (#16893)

(cherry picked from commit 5d1efef)
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

❌ Patch coverage is 35.68465% with 1085 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (force_ci/object_type@d64c291). Learn more about missing BASE report.

Files with missing lines Patch % Lines
.../apache/iotdb/db/queryengine/plan/Coordinator.java 11.11% 144 Missing ⚠️
.../db/protocol/thrift/impl/ClientRPCServiceImpl.java 0.00% 120 Missing ⚠️
...ional/InformationSchemaContentSupplierFactory.java 0.00% 105 Missing ⚠️
...ache/iotdb/db/protocol/client/an/AINodeClient.java 1.88% 104 Missing ⚠️
...config/session/PreparedStatementMemoryManager.java 0.00% 48 Missing ⚠️
.../db/storageengine/load/active/ActiveLoadAgent.java 2.70% 36 Missing ⚠️
...ad/evolvable/request/PipeTransferTabletRawReq.java 33.33% 30 Missing ⚠️
...ueryengine/plan/relational/sql/ast/LoadTsFile.java 0.00% 29 Missing ⚠️
...engine/plan/relational/sql/ParameterExtractor.java 0.00% 28 Missing ⚠️
...b/queryengine/plan/relational/sql/ast/Execute.java 0.00% 27 Missing ⚠️
... and 49 more
Additional details and impacted files
@@                   Coverage Diff                   @@
##             force_ci/object_type   #16894   +/-   ##
=======================================================
  Coverage                        ?   39.03%           
  Complexity                      ?      207           
=======================================================
  Files                           ?     5030           
  Lines                           ?   334374           
  Branches                        ?    42595           
=======================================================
  Hits                            ?   130515           
  Misses                          ?   203859           
  Partials                        ?        0           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
6.7% Duplication on New Code (required ≤ 5%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@JackieTien97 JackieTien97 merged commit 598311a into force_ci/object_type Dec 11, 2025
33 of 35 checks passed
@JackieTien97 JackieTien97 deleted the ty/object_type branch December 11, 2025 03:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants