Skip to content

Pipe: Avoid invalid leader cache hints for table-model batches - #18690

Open
Caideyipi wants to merge 1 commit into
masterfrom
fix/pipe-tablet-batch-redirect
Open

Caideyipi wants to merge 1 commit into
masterfrom
fix/pipe-tablet-batch-redirect

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Pipe tablet batch responses carry per-row redirection statuses. Table-model InsertTabletStatement and InsertRowsStatement batches can contain multiple device IDs, so attaching a single statement path to those statuses can create invalid leader-cache entries and misroute later writes.

This change:

  • keeps redirect device-path metadata for tree-model row and tablet batches;
  • omits per-row leader-cache hints for every table-model batch statement;
  • ignores redirect statuses without a non-empty device path and tolerates malformed nested statuses;
  • adds regression coverage for table-model tablets, table-model rows, tree-model batches, and malformed cache responses.

Validation

  • Manual compilation of both changed production classes and both changed test classes against the existing DataNode artifacts.
  • JUnitCore: 23 tests passed for IoTDBDataNodeReceiverTest and LeaderCacheUtilsTest.
  • mvn -pl iotdb-core/datanode spotless:check '-DskipTests' '-Dcheckstyle.skip=true' passed.
  • git diff --check passed.

The normal Maven test invocation is blocked by pre-existing stale cross-module generated artifacts/dependencies in the checkout (TypeServices, ANTLR, and Thrift symbols in unmodified files); the changed classes compile independently and the targeted tests pass.

@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.92308% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.36%. Comparing base (4405647) to head (aa9df00).

Files with missing lines Patch % Lines
...eceiver/protocol/thrift/IoTDBDataNodeReceiver.java 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master   #18690   +/-   ##
=========================================
  Coverage     44.35%   44.36%           
  Complexity      712      712           
=========================================
  Files          5483     5483           
  Lines        394207   394215    +8     
  Branches      51177    51182    +5     
=========================================
+ Hits         174861   174889   +28     
+ Misses       219346   219326   -20     

☔ 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