Milvex. Migration. Runner
(milvex v0.14.0)
Copy Markdown
Applies a list of %Milvex.Migration.Plan{} against a live Milvus cluster.
The runner is the only module in the migration pipeline that issues mutating
RPCs. It walks the plans sequentially and applies each operation per the
rules in apply/2:
- If any plan in the batch contains an
:impossibleoperation, the runner returns immediately. No RPC is attempted; every non-impossible operation across all plans is reported as:blocked_by_impossibleand every:impossibleop as:blocked_impossible. - For each plan, when
manage_load: trueAND any operation in that plan requires release AND the live collection is loaded, the runner releases the collection before applying the operations and re-loads it after. - Operations are applied in plan order.
:additiveops always run.:destructiveops run only whenallow_drop: true; otherwise they are:skipped_no_flag.:descriptiveops always come back as:skipped_idempotentand never go through the dispatch path. - Per-operation RPC failures DO NOT abort the plan. The failure is recorded and the runner moves on to the next op. Release / reload failures DO abort the plan (no further ops attempted on release failure; ops up to the failure point are kept on reload failure).
- Plans are isolated. A failure in one plan never leaks load state to the next plan.
The runner emits :telemetry spans:
Run-level:
[:milvex, :migrate, :run, :start | :stop | :exception]with start metadata%{mode, allow_drop, manage_load}and stop metadata%{summary: counts}.Op-level:
[:milvex, :migrate, :op, :start | :stop | :exception]with start metadata%{kind, category, collection_name, module, requires_release, milvus_version}and stop metadata%{result: status}. Only operations that actually reach the dispatch path emit telemetry; skipped/blocked ops do not.
Summary
Functions
Applies the given plans against the connection captured in ctx.
Functions
@spec apply([Milvex.Migration.Plan.t()], Milvex.Migration.Runner.Context.t()) :: Milvex.Migration.Runner.ApplyReport.t()
Applies the given plans against the connection captured in ctx.
See the moduledoc for the full set of rules. Returns an %ApplyReport{}.