MigrationCheckpointStore

Where a migration remembers how far it got.

A copy of ten million points will be interrupted at least once, and starting over is not an answer. After every batch that Qdrant has acknowledged, the migration writes the id it reached here; on the next run it reads that id and resumes from it.

The default is inMemory, which survives nothing and is right for a test. Anything that has to survive the process needs a durable one: FileMigrationCheckpointStore on the JVM, or your own — a row in whatever database the job already writes to is usually the least new machinery.

Implementations are called from one coroutine at a time and need no locking of their own.

Inheritors

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
abstract suspend fun clear(id: String)

Forgets id, so the next run starts from the beginning. Called when a migration completes.

Link copied to clipboard
abstract suspend fun load(id: String): MigrationCheckpoint?

The checkpoint stored under id, or null if this migration has not run before.

Link copied to clipboard
abstract suspend fun save(id: String, checkpoint: MigrationCheckpoint)

Records how far the migration id has got. Called once per acknowledged batch.