You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "Caideyipi (via GitHub)" <gi...@apache.org> on 2026/10/12 11:01:10 UTC

[PR] Refactor shared Pipe, consensus and subscription helpers [iotdb]

Caideyipi opened a new pull request, #18837:
URL: https://github.com/apache/iotdb/pull/18837

   ## Description
   
   Shared Pipe, IoTConsensus, and subscription code has diverged structurally between upstream and downstream, creating avoidable merge conflicts. Align the common interfaces, helper methods, and names while preserving the current open-source behavior.
   
   - Introduce `PipeBatchMetricsSettable` for sink and batch-builder metrics, and extract batch detachment without changing atomic ownership handoff.
   - Extract tree-pattern splitting, modification-map construction, schema-snapshot batch flushing, and ConfigNode snapshot file-list helpers; align source naming and database/table matching.
   - Extract consensus retry, missing-group response, and snapshot-cleanup helpers while retaining existing retry decisions, status codes, messages, and locking.
   - Move tablet projector initialization into `TableViewTabletProjectorProvider` and extract consensus tablet pruning. Providers remain scoped to individual batches, preserving schema waits and the lifetime of each batch's cached projector.
   
   Existing public constructors and metric setters remain available. Serialization, column filtering, WAL retry protection, memory admission, and diagnostics retain their current behavior. Enterprise-specific functionality is outside this refactor.
   
   ## Validation
   
   - 185 focused regression tests passed, covering Pipe batching/sinks/receivers/modifications/history, consensus RPC responses and retry handling, subscription conversion/prefetching/projectors, and ConfigNode request serialization.
   - Full reactor `mvn test-compile -DskipTests -Ddevelocity.off=true`.
   - Full reactor `mvn test-compile -DskipTests -P with-zh-locale -Ddevelocity.off=true`.
   - Spotless, Checkstyle, and `git diff --check`.
   
   <details>
   <summary>Focused regression command</summary>
   
   ```bash
   mvn test -Dtest=TreePatternParseTest,IoTConsensusRPCServiceProcessorTest,DispatchLogHandlerTest,PipeTransferBatchReqBuilderTest,ModsOperationUtilTest,IoTDBDataNodeReceiverTest,IoTDBDataRegionAsyncSinkTest,IoTDBDataRegionAirGapSinkTest,PipeHistoricalDataRegionTsFileAndDeletionSourceTest,PipeSinkSubtaskTest,ConsensusLogToTabletConverterTest,ConsensusPrefetchingQueue*Test,TableViewTabletProjectorProviderTest,SubscriptionPipeTabletEventBatchTest,ColumnFilterBinderTest,PipeConfigNodeThriftRequestTest -Dsurefire.failIfNoSpecifiedTests=false -Ddevelocity.off=true
   ```
   
   </details>
   
   This PR has:
   
   - [x] been self-reviewed, including batch synchronization and ownership.
   - [x] added regression tests for missing consensus groups and projector schema/cache lifetime, and adapted the historical-source reflection test to the renamed field.
   


-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Refactor shared Pipe, consensus and subscription helpers [iotdb]

Posted by "Caideyipi (via GitHub)" <gi...@apache.org>.
Caideyipi commented on PR #18837:
URL: https://github.com/apache/iotdb/pull/18837#issuecomment-6414796442

   Self-review passed.
   
   I reviewed the complete diff and relevant surrounding code. No actionable issues were found, so no fixes were needed.
   
   Verification:
   - `git diff --check` — passed.
   - `mvn -pl iotdb-core/consensus -am test -Dtest=IoTConsensusRPCServiceProcessorTest -Dsurefire.failIfNoSpecifiedTests=false` — passed (2 tests, 0 failures, 0 errors).
   - `mvn -pl iotdb-core/datanode -am test -Dtest=TableViewTabletProjectorProviderTest -Dsurefire.failIfNoSpecifiedTests=false` — could not complete because the JVM terminated with an insufficient native memory error before producing test results.


-- 
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: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org