Skip to content

Pipe: Fix leader cache updates for multi-device redirects - #18689

Open
Caideyipi wants to merge 1 commit into
masterfrom
fix/tdb-30-pipe-leader-cache
Open

Caideyipi wants to merge 1 commit into
masterfrom
fix/tdb-30-pipe-leader-cache

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Multi-device insert-node responses can carry leader redirections in per-device sub-statuses. The pipe sender previously handled only a top-level redirect for direct insert-node transfers, so its leader cache could remain stale and repeatedly route writes to the wrong receiver node.

This change:

  • adds device paths to redirection sub-statuses for direct insert-node and binary requests;
  • recursively extracts per-device redirects from variable-sized batch/direct responses;
  • updates both async and sync sink leader caches for every redirected device;
  • adds coverage for multi-device, single-device, nested, diagnostic, and non-redirection statuses.

Validation

  • Targeted tests: 7/7 passed on the 2.0.12.1 source baseline before porting the patch to master.
  • mvn -pl iotdb-core/datanode spotless:check -DskipTests -Dcheckstyle.skip=true
  • git diff --check

The 40 GB cluster workload has not been rerun locally. A targeted test rerun after switching to master was blocked by unrelated stale cross-module generated artifacts/dependencies in the local checkout; none of the reported compilation errors referenced the files changed here.

@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.66667% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.37%. Comparing base (a670bce) to head (08466e2).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
...eceiver/protocol/thrift/IoTDBDataNodeReceiver.java 0.00% 4 Missing ⚠️
.../protocol/thrift/sync/IoTDBDataRegionSyncSink.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18689      +/-   ##
============================================
+ Coverage     44.35%   44.37%   +0.01%     
  Complexity      712      712              
============================================
  Files          5483     5483              
  Lines        394204   394220      +16     
  Branches      51176    51181       +5     
============================================
+ Hits         174867   174933      +66     
+ Misses       219337   219287      -50     

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

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