Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
1342236 to
0ad75ac
Compare
|
run buildall |
Cloud UT Coverage ReportIncrement line coverage Increment coverage report
|
0ad75ac to
f07819b
Compare
|
run buildall |
FE UT Coverage ReportIncrement line coverage |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
…matrix Two fault-matrix suites over the dispatcher's two test seams (the manager's edit-log capture and the sendExecuteRequest override; zero real RPC, no utframe cluster): LanceIndexJobDispatcherTest pins the five-phase round order in one round, journal-before-send as the direct durable-before-send evidence, the no-second-dispatch discipline (CAS loss skips the send and retries with a fresh identity next round; pre-send recheck failure never sends), the send outcomes (clean error -> NOT_COMMITTED, transport failure or preparation failure -> UNKNOWN with the possible-live slot retained), per-round and per-backend backpressure, no-backend and corrupt-record deferrals, the deadline sweep (expired only, callback-first warns), the epoch sweep (epoch change releases the slot, also for UNKNOWN jobs; missing entry, same epoch, and heartbeat loss never do), the local-filesystem topology gate in both directions, per-round mutable interval reload, the idle round's zero journal records, and storage options reaching the wire while never appearing in any durable record. LanceIndexJobRefreshDriverTest pins markRefreshRunning -> handleRefreshTable(catalog, db, table, ignoreIfNotExists=true) -> DONE with exact order and arguments and the fence/quota release, DdlException keeping the fence for a retried attempt, the FAILED-only retry throttle (fresh skipped, stale retried; a first REQUIRED refresh is never delayed), the silent half-orphan completion, the force-release exclusion, the master-transfer downgrade convergence, and the fail-closed missing-catalog path.
…ption Capture the backend process epoch once so the journaled RUNNING record and the wire request always carry the same dispatch identity; a heartbeat landing between the two reads must not split it. Re-assert the positive invariant at consumption for the dispatcher configs (fe.conf bypasses the validator): clamp the dispatch interval, execute deadline, and the two dispatch caps so a handcrafted fe.conf cannot kill or busy-spin the daemon thread, sweep fresh dispatches UNKNOWN, or stall dispatch. The refresh retry interval stays unclamped: a non-positive value only disengages the throttle. Also pin the thrift struct field ids in the contract test (a symmetric round-trip cannot catch renumbering), cover the leadership-loss pre-send recheck and the checkpoint-thread skip, and fix the camelCase method name in two IDL comments.
f07819b to
6269177
Compare
|
run buildall |
FE UT Coverage ReportIncrement line coverage |
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
FE Regression Coverage ReportIncrement line coverage |
What problem does this PR solve?
Issue Number: #66497
Related PR: #67630 (merged — this change was stacked on it; the diff is exactly the dispatcher change described below), #67754 (open — independent; shares only the job manager queries and the config block tail)
Problem Summary:
The durable Lance index job records created by the admission path (#67630) currently stay
PENDINGforever: nothing drives them toward a terminal state and no execution channel exists. This change adds the master-side driver and the dispatch-boundary contracts so an admitted job can be dispatched at most once, classified into its terminal state, and released — still entirely behind the disabled-by-defaultenable_lance_index_mutationgate.What lands
TLanceIndexJobDispatch/TLanceIndexJobReportplussubmit_lance_index_jobandreportLanceIndexJobResult, four new enums with explicit value numbering and explicit struct field ids. Storage credentials are resolved from the current catalog properties at send time and travel only inside the dispatch request — never journaled, logged, or persisted. No backend consumption lands here (the isolated worker is a later release); the backend handler stub answers a clean not-implemented error, so a cluster without workers resolves a dispatched job asNOT_COMMITTEDinstead ofUNKNOWN.LanceIndexJobDispatcher(master-onlyMasterDaemon, one round in fixed order):RUNNINGjob converges toUNKNOWNthroughcompleteWithResult(NO_TRUSTED_RESULT); the possible-live slot, the same-name fence, and the unresolved-job quota all stay held (a deadline bounds the wait, never proves termination);REQUIRED/FAILEDresume through the existing idempotent external-table refresh path;FAILEDretries are throttled to one attempt per retry interval while a firstREQUIREDrefresh is never delayed;DONEreleases the fence and quota through the existing apply-to-memory accounting;RUNNING(invocation id, backend process epoch, deadline) is journaled before any network I/O, and the single send carries exactly the journaled identity — the backend process epoch is captured once, so a heartbeat landing between the journal and the send cannot split it; leadership/revision/invocation-id are rechecked immediately before the send; per-round and per-backend in-flight caps bound the dispatch rate; local-file datasets additionally require the separate operator assertion and a single-FE, single-alive-backend topology.completeWithResult(the identity check and the result classification live in the job manager from branch-4.1: [feature](lance) Durable Lance index job infrastructure with fence, quota and replay #67235); an envelope carrying a child-reap proof releases the possible-live slot; stale or malformed envelopes are logged and dropped. The refresh a terminal job still owes is driven from the daemon rather than this RPC thread, so a driver lost mid-refresh is recovered by the master-transfer downgrade.Design interpretations (please confirm)
TTaskType/the agent-task queue: this avoids wire-enum drift across branches and the tablet-oriented semantics (and resend culture) of that track; FE-side single-send plus the manager compare-and-set already provide at-most-once.PENDINGand retries on the next round.UNKNOWNimmediately; only a clean error status — provably not enqueued — resolvesNOT_COMMITTEDas a resource rejection.file://handling enforces the topology rejection at dispatch only; the pre/post-invocation version and identity checks belong to the worker slice.PENDINGjob (say, a local-file dataset with the operator assertion off) heads every round and blocks the dispatch of later jobs. It stays visible through the job inspection SQL from branch-4.1: [feature](lance) Add Lance index admission, job inspection SQL and catalog DDL guard #67630 and releasable through the force-release path (branch-4.1: [feature](lance) Add RESOLVE LANCE INDEX JOB (FORCE_RELEASE) and job retention GC #67754); the job-id order is what keeps each round deterministic.Concurrency
The dispatcher holds no catalog or manager lock across any call; every durable transition goes through the job manager under its own lock, and the catalog → job-manager lock order is unchanged. The report handler runs on the RPC thread and performs no I/O beyond the manager's edit-log write. The daemon early-exits on lost mastership and on the checkpoint thread, and journal volume stays bounded: an idle round writes no record, a throttled stuck refresh costs at most two records per retry interval, and a dispatch round writes at most the per-round cap.
Validation
-Dtest='Lance*'): 515 tests, 0 failures / 0 errors / 0 skipped (fe-core 504 + fe-common 11; 81 tests are new — dispatcher 33, refresh driver 10, report handler 16, frontend shim 3, thrift contract 8, manager queries +5, wiring +2, config validator +4 — alongside the existing suites), with checkstyle.DiskReblanceWhenSchedulerIdle, re-verified to fail with the same assertion on the merge base itself. Zero new failures.test_lance_index_dispatch.groovy: negative/static only (config smoke, dispatcher-inert assertions); it needs the external docker fixture and runs in the pipeline, not locally.test_lance_index_admission.groovywas made deterministic by pinning the dispatch interval for its window, because admitted jobs are now actually dispatched once the gate is open.Deferred
UNKNOWNproduction (fault-injection UT covers the lifecycle contracts; the end-to-end evidence belongs to the worker slice).Release note
None — fully gated behind the disabled-by-default
enable_lance_index_mutation; no user-visible behavior change.Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)