Repository navigation
Avoid tablet fallback after uncertain LOAD RPC failures - #19427
Conversation
LOAD retry correctness update
|
Windows CI follow-up
|
PR comment follow-up
|
CI failure follow-up
|
PR comment follow-up
|
| final TsFileLoadStrategy strategy = resolveStrategy(node, userName); | ||
| strategy = resolveStrategy(node, userName); | ||
| final boolean loadSuccess = strategy.execute(node); | ||
| if (!loadSuccess && strategy.shouldSkipTabletFallback()) { |
There was a problem hiding this comment.
minor iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/plan/scheduler/load/LoadTsFileScheduler.java:447 — Fallback-suppression wiring in LoadTsFileScheduler has no regression test
Trigger: the new decision of the PR - recording the index from strategy.shouldSkipTabletFallback() (lines 447-449) and the catch branch (467-469). The only scheduler test (LoadTsFileSchedulerTest:188) covers the pre-dispatch partition failure where strategy == null, and the strategy/handler tests never go through the scheduler, so a regression (wrong index recorded, !loadSuccess flipped, catch branch dropped) passes every test.
Fix: Add a scheduler test where a stub strategy returns false with shouldSkipTabletFallback() true and assert the file is passed to LoadFallbackHandler as blocked and never converted to tablets.
There was a problem hiding this comment.
Added scheduler coverage with a stub strategy for both a false result and an exception while shouldSkipTabletFallback() is true. The tests assert the fallback handler reports the file as blocked instead of converting it to tablets. The focused scheduler and fallback test run passed (18 tests total).
|
minor setUp() suppresses Fix: Drop the PowerMock suppression of getFailedFilePathsString (the java.util.stream PowerMock ignore already covers JDK 17 instrumentation), remove the now-dead null check, and assert that blocked files are filtered out of the INFO line. |
|
Removed the PowerMock suppression so the real failed-file-path collector runs, removed the redundant null check, and added a Logback assertion that the fallback INFO entry includes the convertible file but omits the blocked file. This is covered by the focused 18-test pass. |
PR comment follow-up
|
Summary
Behavior example
For a LOAD of
events.tsfile, a PIECE request may reach a DataNode while its response is lost, leaving the result uncertain. The loader retries within its bounded RPC policy; if uncertainty remains after retries, it fails the LOAD and does not re-import the file through tablet fallback.Validation
git diff --checkpassed.