Skip to content

Disable multi-node REMOVE statements - #18360

Merged
CRZbulabula merged 1 commit into
masterfrom
yongzao/disable-multi-node-remove
Jul 30, 2026
Merged

Disable multi-node REMOVE statements#18360
CRZbulabula merged 1 commit into
masterfrom
yongzao/disable-multi-node-remove

Conversation

@CRZbulabula

@CRZbulabula CRZbulabula commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Description

This PR restricts cluster-node removal statements to a single node ID in both SQL dialects.

  • update the tree-model and table-model grammars so REMOVE DATANODE accepts exactly one DataNode ID
  • construct a singleton DataNode ID list in both AST builders
  • verify that tree-model and table-model parsers accept single-node REMOVE DATANODE / REMOVE CONFIGNODE statements and reject multiple node IDs
  • remove the integration test for removing two DataNodes in one statement

Tests

  • mvn -q test -pl iotdb-core/datanode -am -Dtest=RemoveNodeSingleNodeParseTest,RemoveNodeSingleNodeStatementTest -Dsurefire.failIfNoSpecifiedTests=false -DfailIfNoTests=false
  • built and deployed a local pseudo-distributed 3 ConfigNode + 3 DataNode cluster from commit 63a44a745a
  • verified all six nodes were Running with matching BuildInfo, with schema and data replication factors set to 2
  • inserted and flushed tree-model sample data, then read the same three rows through DataNode RPC ports 6667, 6767, and 6867
  • verified both tree-model and table-model parsers reject multi-node REMOVE DATANODE and REMOVE CONFIGNODE statements at the comma

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
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

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.41%. Comparing base (4861027) to head (63a44a7).
⚠️ Report is 10 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18360      +/-   ##
============================================
+ Coverage     43.14%   43.41%   +0.27%     
  Complexity      374      374              
============================================
  Files          5364     5366       +2     
  Lines        382623   382956     +333     
  Branches      49749    49809      +60     
============================================
+ Hits         165077   166259    +1182     
+ Misses       217546   216697     -849     

☔ 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 3a06ed4 into master Jul 30, 2026
43 of 44 checks passed
@CRZbulabula
CRZbulabula deleted the yongzao/disable-multi-node-remove branch July 30, 2026 08:00
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