Skip to content

[Pipe] Add SHOW PIPE MEMORY for named memory blocks - #18575

Open
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:show-pipe-memory
Open

[Pipe] Add SHOW PIPE MEMORY for named memory blocks#18575
Caideyipi wants to merge 1 commit into
apache:masterfrom
Caideyipi:show-pipe-memory

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Named Pipe memory blocks

  • Add an immutable name to every PipeMemoryBlock managed by PipeMemoryManager.
  • Propagate descriptive names through all Pipe memory allocation APIs and call sites.
  • Keep live zero-sized blocks visible until release, while using weak references so diagnostics do not retain otherwise unreachable zero-sized blocks.
  • Preserve one output row per block instance; blocks with the same name are not aggregated.

SHOW PIPE MEMORY and information_schema

  • Add SHOW PIPE MEMORY in the table SQL dialect.
  • Add information_schema.pipe_memory with:
    • name STRING TAG
    • memory_usage_in_bytes INT64 ATTRIBUTE
  • Expose floating memory as an independent FloatingMemory block.
  • Read the table from the local DataNode and require global system privilege.

Tests

  • Add parser and PipeMemoryManager unit coverage.
  • Update IoTDBDatabaseIT for table discovery, schema, permissions, SHOW/SELECT access, and system-table counts.
  • Verified:
    • mvn -o install -pl iotdb-core/node-commons,iotdb-core/relational-grammar -DskipTests
    • mvn -o test -pl iotdb-core/datanode -Dtest=ShowPipeMemoryTest,PipeMemoryManagerResizeTest,LoadTsFileMemoryManagerTest -Dcheckstyle.skip=true -Dspotless.check.skip=true
    • mvn checkstyle:check -pl iotdb-core/datanode
    • git diff --check

The integration test module could not be executed locally in offline mode because several required snapshot artifacts were unavailable.


This PR has:

  • been self-reviewed.
    • concurrent read and write
  • added comments explaining non-obvious lifecycle and accounting behavior.
  • added unit tests or modified existing tests to cover new code paths.
  • added integration tests.

Key changed/added classes
  • PipeMemoryBlock
  • PipeMemoryManager
  • InformationSchema
  • InformationSchemaContentSupplierFactory
  • RelationalSql.g4
  • AstBuilder
  • IoTDBDatabaseIT

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.

1 participant