[Pipe] Add SHOW PIPE MEMORY for named memory blocks - #18575
Conversation
| this.allocatedMemoryBlock = | ||
| PipeDataNodeResourceManager.memory().forceAllocateForTabletWithRetry(0); | ||
| PipeDataNodeResourceManager.memory() | ||
| .forceAllocateForTabletWithRetry(PipeStatementInsertionEvent.class.getSimpleName(), 0); |
There was a problem hiding this comment.
Add some identifiers from the event?
There was a problem hiding this comment.
Implemented in 5c7cf74, with follow-up fixes in c0163e0. Event-owned blocks now record an assigner snapshot from the event. For EnrichedEvent, it uses coreReportMessage() and falls back to toString() when needed; the snapshot is bounded and does not retain the event object. The same handling is applied to the other event allocation sites.
| memoryManager.forceAllocateForTabletWithRetry(currentModifications.ramBytesUsed()); | ||
| memoryManager.forceAllocateForTabletWithRetry( | ||
| TsFileInsertionEventQueryParser.class.getSimpleName() + "#modifications", | ||
| currentModifications.ramBytesUsed()); |
There was a problem hiding this comment.
Included in 5c7cf74, with follow-up fixes in c0163e0. Parser child blocks inherit the source event diagnostic snapshot; PipeTsFileInsertionEvent.coreReportMessage() includes the tsFile identity, so the file name is visible in assigner while the snapshot remains bounded and detached from the event object.
| this.allocatedMemoryBlockForBatchData = | ||
| memoryManager.forceAllocateForTabletWithRetry( | ||
| TsFileInsertionEventScanParser.class.getSimpleName() + "#batchData", 0); | ||
| this.allocatedMemoryBlockForChunk = | ||
| memoryManager.forceAllocateForTabletWithRetry( | ||
| TsFileInsertionEventScanParser.class.getSimpleName() + "#chunk", 0); |
There was a problem hiding this comment.
Is it possible that the PipeMemoryManager has some aggregated memory blocks, like "batchData", "chunk", "xxxEvent".
The memory blocks allocated come from the associated parent blocks, and can be shown as an aggregated result.
There was a problem hiding this comment.
Or, we can add a category for each memory block.
There was a problem hiding this comment.
Implemented in 5c7cf74, with follow-up fixes in c0163e0. Each event now has an aggregate EVENT block, and parser/tablet/metadata blocks register as children. Child allocations charge the global pool once through the root; parent rows expose aggregate usage and accounted_memory_usage_in_bytes identifies the bytes actually charged.
There was a problem hiding this comment.
…pe-memory # Conflicts: # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tsfile/PipeTsFileInsertionEvent.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/PipeMemoryManager.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/tsfile/PipeTsFilePublicResource.java # iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/payload/evolvable/batch/PipeTabletEventBatch.java
Description
Named Pipe memory blocks
SHOW PIPE MEMORY and information_schema
Tests
The integration test module could not be executed locally in offline mode because several required snapshot artifacts were unavailable.
This PR has:
Key changed/added classes