State management for incremental restore tracking.
Uses a separate Datomic database to track restore sessions and entity ID mappings, enabling resumable restores with automatic catch-up.
State management for incremental restore tracking. Uses a separate Datomic database to track restore sessions and entity ID mappings, enabling resumable restores with automatic catch-up.
(create-session! state-conn source-db-name dest-db-name)Create a new restore session for the given database names. Returns the session UUID.
Create a new restore session for the given database names. Returns the session UUID.
(ensure-schema! state-conn)Install the restore state schema. Idempotent - safe to call multiple times.
Install the restore state schema. Idempotent - safe to call multiple times.
(find-or-create-session! state-conn source-db-name dest-db-name)Find or create a restore session for the given database names. Returns the session.
Find or create a restore session for the given database names. Returns the session.
(find-session db source-db-name dest-db-name)Find an existing restore session by source and dest database names. Returns session entity map or nil if not found.
Find an existing restore session by source and dest database names. Returns session entity map or nil if not found.
(load-eid-mappings db session-id)Load all EID mappings for the given session. Returns a map from source-eid to dest-eid.
Load all EID mappings for the given session. Returns a map from source-eid to dest-eid.
Schema for restore state tracking database.
Schema for restore state tracking database.
(update-restore-state! state-conn
{:keys [session-id new-mappings last-source-tx
batch-size]})Update the restore state with new mappings and last-source-tx.
Options:
Returns nil.
Update the restore state with new mappings and last-source-tx. Options: - :session-id - UUID of the session - :new-mappings - Map of source-eid -> dest-eid - :last-source-tx - New source transaction ID - :batch-size - Number of mappings per transaction Returns nil.
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 |