Skip to content

Fix pipe schema snapshot database creation#17910

Open
Caideyipi wants to merge 3 commits into
masterfrom
codex/fix-pipe-schema-snapshot-database
Open

Fix pipe schema snapshot database creation#17910
Caideyipi wants to merge 3 commits into
masterfrom
codex/fix-pipe-schema-snapshot-database

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

This patch creates the exact tree-model database on the receiver before replaying a schema region snapshot. Without this, replayed schema statements may trigger auto database creation with the receiver-side default database level, creating an ancestor database such as
oot.test. Later synchronization of the real source databases, for example
oot.test.g_0 or
oot.test.sg_0, then conflicts with that ancestor database and realtime tablet events fail because the exact database does not exist.

The change also treats an already-existing exact database as idempotent success and maps database conflicts during this pre-create step to pipe receiver user conflicts.

Tests

  • mvn -pl iotdb-core/datanode -DskipTests spotless:apply
  • mvn -pl iotdb-core/datanode -DskipTests compile fails before validating this change because the local master build resolves/generated mismatched symbols unrelated to this file, including NextFillNode, M4TableFunction, and subscription consensus config methods.

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 41.06%. Comparing base (69c0b18) to head (1ba4d75).
⚠️ Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
...eceiver/protocol/thrift/IoTDBDataNodeReceiver.java 0.00% 22 Missing ⚠️
.../apache/iotdb/db/queryengine/plan/Coordinator.java 0.00% 5 Missing ⚠️
.../protocol/legacy/IoTDBLegacyPipeReceiverAgent.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #17910      +/-   ##
============================================
+ Coverage     40.83%   41.06%   +0.22%     
  Complexity      318      318              
============================================
  Files          5245     5248       +3     
  Lines        363206   364215    +1009     
  Branches      46780    47046     +266     
============================================
+ Hits         148328   149572    +1244     
+ Misses       214878   214643     -235     

☔ 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.

@sonarqubecloud

Copy link
Copy Markdown

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