BOUNDARY: thin Result-tracked wrappers around Milvus side effects
used by the relocation pipeline. Each fn does ONE Milvus call,
wrapped in r/try-effect* so failures stay railway-tracked
instead of escaping as exceptions.
These replace the bare @(milvus/...) + bare try/catch
patterns in hive-milvus.store.entries for the routing-aware
path. Pre-existing entries.clj fns are not modified here (out of
scope per the refactor plan).
BOUNDARY: thin Result-tracked wrappers around Milvus side effects used by the relocation pipeline. Each fn does ONE Milvus call, wrapped in `r/try-effect*` so failures stay railway-tracked instead of escaping as exceptions. These replace the bare `@(milvus/...)` + bare `try`/`catch` patterns in `hive-milvus.store.entries` for the routing-aware path. Pre-existing entries.clj fns are not modified here (out of scope per the refactor plan).
(ensure-target-collection {:keys [entry] :as bundle})Promote step that calls ensure-routed! for the entry's :type so
subsequent milvus-write! won't 1804 on a missing collection.
Bundle in: {:entry e …} Bundle out: same (no new keys; effect-only step, threaded for short-circuit on failure).
Promote step that calls `ensure-routed!` for the entry's :type so
subsequent `milvus-write!` won't 1804 on a missing collection.
Bundle in: {:entry e …}
Bundle out: same (no new keys; effect-only step, threaded for
short-circuit on failure).(milvus-delete! bundle-result)Boundary: delete the entry's id from its src collection AFTER a successful target write. Failures here are LOGGED but do NOT roll back the write — duplicate row in the source is preferred over data loss. Returns r/ok bundle so the pipeline finalizes even when source delete fails.
Boundary: delete the entry's id from its src collection AFTER a successful target write. Failures here are LOGGED but do NOT roll back the write — duplicate row in the source is preferred over data loss. Returns r/ok bundle so the pipeline finalizes even when source delete fails.
(milvus-write! bundle-result)Boundary: upsert :record into :target-coll via Milvus add.
Returns r/ok bundle on success or r/err :boundary/milvus-write-failed.
Anaphoric value = the bundle map; we read :target-coll and :record
off of it. On failure, the entry is NOT in target — caller must
decide whether to retry or roll forward (relocate is idempotent
when run on the same id later).
Boundary: upsert `:record` into `:target-coll` via Milvus add. Returns r/ok bundle on success or r/err :boundary/milvus-write-failed. Anaphoric `value` = the bundle map; we read :target-coll and :record off of it. On failure, the entry is NOT in target — caller must decide whether to retry or roll forward (relocate is idempotent when run on the same id later).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |