Skip to content

[To dev/1.3] Handle invalid DataNode id in region operations - #18478

Merged
CRZbulabula merged 1 commit into
dev/1.3from
yongzao/v1-411-invalid-datanode-region-operations
Aug 16, 2026
Merged

[To dev/1.3] Handle invalid DataNode id in region operations#18478
CRZbulabula merged 1 commit into
dev/1.3from
yongzao/v1-411-invalid-datanode-region-operations

Conversation

@CRZbulabula

Copy link
Copy Markdown
Contributor

Description

Semantic backport of #18075 to dev/1.3.

Behavior

  • Resolve the target DataNode before processing reconstruct and extend region requests.
  • Return RECONSTRUCT_REGION_ERROR or EXTEND_REGION_ERROR with the target id when it is not a registered DataNode, including when a ConfigNode id is supplied.
  • Avoid region resolution and procedure submission for invalid targets.
  • Preserve the existing behavior for registered DataNodes.

Tests

  • ProcedureManagerRegionOperationTest
  • IoTDBRegionGroupExpandAndShrinkForIoTV1IT#rejectInvalidTargetDataNodeTest
  • IoTDBRegionReconstructForIoTV1IT#rejectInvalidTargetDataNodeTest
  • IoTDBRegionGroupExpandAndShrinkForIoTV1IT#singleRegionTest
  • Checkstyle and Spotless

This PR has:

  • been self-reviewed.
  • added unit tests.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes
  • ProcedureManager
  • ProcedureManagerRegionOperationTest
  • IoTDBRegionGroupExpandAndShrinkForIoTV1IT
  • IoTDBRegionReconstructForIoTV1IT

@codecov

codecov Bot commented Aug 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.57%. Comparing base (6e8a31a) to head (511f581).

Additional details and impacted files
@@              Coverage Diff              @@
##             dev/1.3   #18478      +/-   ##
=============================================
+ Coverage      44.50%   44.57%   +0.06%     
  Complexity       198      198              
=============================================
  Files           3643     3643              
  Lines         246811   246822      +11     
  Branches       30316    30319       +3     
=============================================
+ Hits          109851   110009     +158     
+ Misses        136960   136813     -147     

☔ View full report in Codecov by Harness.
📢 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.

@CRZbulabula
CRZbulabula merged commit a177a93 into dev/1.3 Aug 16, 2026
16 of 17 checks passed
@CRZbulabula
CRZbulabula deleted the yongzao/v1-411-invalid-datanode-region-operations branch August 16, 2026 08:18
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