AI systems & deployment

Inside Airtable: Keeping a Vector Index in Step With Changing Records

Follow a record update through asynchronous generation, versioned storage and publication, then examine what a search service may safely return.

Funds & Asset ManagementIndependent technical study

Source case: Airtable. The article separates the published design from the data, methods and observations in this local experiment.

The source changed while its embedding was being generated

An analyst searches a fund-reporting workspace after a report is corrected. The source now contains the approved AUM figure, but an older paragraph still appears in search. A worker successfully generated and stored a vector. It simply finished after a newer worker and replaced the newer result.

This is a lifecycle problem that can survive a good embedding model. Document identity, content revision, configuration and publication order determine whether a candidate belongs to the current source. Faster generation reduces the interval in which the problem can occur; it does not establish a correct ordering.

Airtable’s published engineering account places vector generation outside its single-writer source database. It tracks source-update and persisted-embedding transaction numbers, uses ordered conditional writes and deletions, and resets embedding configurations for migrations and recovery. The design accepts eventual consistency to avoid putting embedding generation inside source transactions. Those are the published mechanisms; the implementation below independently explores a different publication contract.

Separate a finished vector from a published current result

Independent study architecture: authoritative source state creates versioned jobs; workers write immutable vector objects and conditionally publish a pointer; reads check current source and configuration, while reconciliation recovers unfinished work.Open full-size diagram (opens in a new tab)

Independent study design inspired by the source’s versioning problem. Immutable objects and a SQL publication pointer are the local variant, not Airtable’s original diagram or vector-store implementation.

Design reference: Airtable Engineering Blog

My design interpretation starts with three separate events: the source commits, an artifact is stored, and that artifact becomes eligible for reads. Treating them as one successful job hides failures between those events. A write to external storage can succeed even when the acknowledgement back to source state is lost.

The local variant stores each artifact under an immutable version-addressed key. SQLite owns the source record, target configuration, job state and published pointer. In the new durable experiment, a separately spawned worker writes a JSON object file, flushes it, then attempts a conditional pointer update. An obsolete artifact may remain in storage, but it does not acquire authority merely by existing there.

This is useful when a storage API cannot provide the same conditional-update semantics as the authoritative database. The cost is additional object versions, pointer resolution and eventual garbage collection. It is an alternative worth comparing with monotonic writes to a mutable vector record, not a claim that immutable objects are always the better design.

One revision number is not a complete identity

A fictional report changes from revision 1 to revision 2. A job must retain the exact revision it read. Looking up the current revision when publishing and attaching that number to an old vector would make the bookkeeping appear correct while labelling obsolete content as fresh.

The job therefore captures record ID, record lifetime, revision, content fingerprint and target namespace together. The namespace represents the generation configuration. A read checks that the published artifact still matches the authoritative combination.

ChangeWhy an earlier identity is insufficient
Source content is editedThe record ID stays the same while revision and content change.
A record is deleted and recreatedA new lifetime can restart at revision 1. ID and revision can match the old job.
The generation configuration changesThe text can be unchanged while the required representation changes.
A task is delivered twiceRepeating the same identity should preserve the same artifact rather than create a different result under that key.

The lifetime field addresses an ABA-style ambiguity: an identifier appears to return to a familiar state but refers to a different incarnation. Configuration identity addresses another ambiguity: equal vector dimensions do not establish that an artifact belongs to the intended model or indexing strategy.

The initial replay uses fixed-vocabulary token counts, with a binary-presence variant for the second configuration. The durable worker supplement also uses token vectors. This keeps the question focused: can the current source identity survive an actual late or interrupted worker? Embedding relevance remains a separate investigation.

Put the publication condition in the write itself

Consider two jobs that captured different source revisions. The newer job finishes first and publishes its pointer. The older job then returns. A separate application check followed by an unconditional write leaves a gap in which the source or target can change again.

The executed worker function below places the required source and target conditions in one SQL update. It also acknowledges the job in the same SQLite transaction. The immutable file write happens earlier, outside that transaction. A successful object write therefore does not imply a successful publication or a completed job.

Actual durable worker: publish conditionally and acknowledge the job in one transactionPython12 lines
def publish(path, key, job, guarded=True):
    with connect(path) as db:
        db.execute('BEGIN IMMEDIATE')
        if guarded:
            changed = db.execute("""UPDATE source SET pointer=? WHERE id=? AND life=?
              AND revision=? AND body_hash=? AND deleted=0
              AND ?=(SELECT namespace FROM target)""",
              (key, job['id'], job['life'], job['revision'], job['body_hash'], job['namespace'])).rowcount
        else:
            changed = db.execute('UPDATE source SET pointer=? WHERE id=?', (key, job['id'])).rowcount
        db.execute("UPDATE jobs SET state='done',outcome=? WHERE key=?", ('published' if changed else 'obsolete', key))
        return bool(changed)

There are two distinct protections. Conditional publication preserves a newer pointer when older work completes. A source-aware read independently rejects a pointer that no longer matches an edited, deleted or reconfigured source. Neither should be presented as a substitute for the other.

The replay therefore compares three paths. Blind publication plus an index-only read can expose obsolete content. Adding a freshness filter withholds that content but cannot restore a newer pointer already displaced by the old worker. Guarded publication plus the same freshness filter preserves the current result once the newer work has finished.

This separation matters for diagnosis. A system can stop returning stale candidates yet still lose useful availability because it repeatedly points at obsolete artifacts. Reporting only stale-result counts would miss that second failure.

Correct rejection still needs a path back to progress

A worker writes an immutable object and fails before publishing its pointer. The object exists, but the authoritative state has no eligible result. Another source update might also fail to produce a task at all. Rejecting obsolete jobs does not repair either condition.

The durable supplement interrupts a real worker after the object file has been flushed and before SQL publication. A reopened connection still finds a running job and no published result. The controller establishes that the worker has exited, resets that abandoned job to pending, and starts a replacement worker. It finds the identical existing file, publishes its pointer and acknowledges the job. The object count remains one.

This is a recoverable boundary rather than a distributed transaction. The file write and source update can complete independently. The content-addressed retry is useful because it can finish the interrupted work without inventing a second artifact identity. Termination during a partial file write is a different failure window; this run deliberately terminates after the completed write.

Actual worker experiment: a flushed immutable object survives a worker interruption, while the SQLite job remains running; explicit requeue and a replacement worker then publish the current pointer.Open full-size figure (opens in a new tab)
Executed recovery boundary. Object persistence and SQL publication are separate commits; the saved trace includes the interruption, reopened job state and replacement worker.

The local controller knows the original process has exited. A deployed service would need leases, heartbeats and ownership before reclaiming work that might still be running elsewhere. It also needs scan coverage and a policy for repeated generation failure. A count of rejected old jobs could look healthy while the backlog grows; time without an eligible current artifact describes the reader’s experience more directly.

Deletion adds a separate responsibility. The strict read path can withhold a deleted record even if an old worker leaves an unreferenced object behind. That is a visibility property. Physical erasure and retention require storage cleanup; this prototype does not implement that cleanup.

Configuration changes also create an availability decision. The replay switches the target namespace immediately and withholds old-namespace artifacts until replacement work finishes. A dual-index transition could reduce that gap, but would need coverage checks and a cutover policy. It has not been implemented here.

What the actual schedules reveal

The worker experiment executes four schedules with each publication policy, for eight persisted workspaces. Independent workers and a release gate make the late-completion order explicit. Every final view reopens SQLite and reads the stored files.

Actual scheduleBlind publicationConditional publicationResulting decision
Revision 1 finishes after revision 2Pointer regresses to revision 1; strict read withholds it.Revision-2 pointer remains current.Enforce ordering in the write as well as freshness in reads.
Process exits after storing its objectNo published result until recovery.Same recovery requirement.Rejection rules do not replace retry ownership.
Source changes without a new taskOld pointer is held until reconciliation enqueues current work.Same recovery requirement.Compare source coverage with eligible-index coverage.
Deletion precedes old completionBlind index view exposes an obsolete artifact; strict read holds it.Old publication is rejected.Deletion visibility and physical cleanup need separate policies.

The earlier seven-schedule in-memory replay remains a compact explanation of recreation, duplicate delivery and configuration identity. Its 4/7 stale blind candidates and 3/6 versus 6/6 current-result counts belong to that earlier fixture, not the new process run. The two experiments answer complementary questions: semantic identity and actual execution boundaries.

Inspect the actual worker execution and durable recovery outcomes

Recorded experiment

What the experiment actually shows

Actual spawned workers, SQLite job/publication state and fsynced immutable JSON objects. Controlled local schedules; token vectors, not learned embeddings.

Data and comparison boundary

Methods compared

Blind pointer publication
A completed worker can replace the pointer regardless of current source revision.
Guarded publication plus source-checked reads
One conditional SQL update preserves current identity. Interrupted work is explicitly requeued only after the old process has exited.

Recorded findings

Late completion, blind write
stale

The old worker replaces revision 2 with revision 1. Read filtering then withholds the candidate.

Late completion, guarded write
current

The old worker cannot replace the revision-2 pointer.

Persisted object followed by process termination
Recovered in both arms

The running job survives in SQLite. An explicit recovery resets it; a new worker reuses the same single object file and publishes.

Inspect a recorded example

Late completion
Input

Run the same explicit schedule in two separately persisted workspaces.

Baseline output

{ "schedule": "late_completion", "guarded": false, "before_recovery": null, "index_read": { "status": "stale", "revision": 1, "body": "Approved AUM EUR 12 billion" }, "source_checked_read": { "status": "held", "source_revision": 2 }, "object_files": 2, "jobs": [ { "key": "24ae67f2e6f11d7321f63e9bd93c40ac88ae23187c1c5bb52d9b2b2aeaa54c42", "state": "done", "outcome": "published" }, { "key": "947a6c4e6eccdf1fc94ab86917a416c879a9330f03a6f892c26420a588e26585", "state": "done", "outcome": "published" } ], "trace": [ { "stage": "object_persisted", "revision": 1 }, { "stage": "object_persisted", "revision": 2 }, { "stage": "finished", "published": true }, { "stage": "object_persisted", "revision": 1 }, { "stage": "finished", "published": true } ] }

Candidate output

{ "schedule": "late_completion", "guarded": true, "before_recovery": null, "index_read": { "status": "current", "revision": 2, "body": "Approved AUM EUR 14 billion" }, "source_checked_read": { "status": "current", "revision": 2, "body": "Approved AUM EUR 14 billion" }, "object_files": 2, "jobs": [ { "key": "24ae67f2e6f11d7321f63e9bd93c40ac88ae23187c1c5bb52d9b2b2aeaa54c42", "state": "done", "outcome": "obsolete" }, { "key": "947a6c4e6eccdf1fc94ab86917a416c879a9330f03a6f892c26420a588e26585", "state": "done", "outcome": "published" } ], "trace": [ { "stage": "object_persisted", "revision": 1 }, { "stage": "object_persisted", "revision": 2 }, { "stage": "finished", "published": true }, { "stage": "object_persisted", "revision": 1 }, { "stage": "finished", "published": false } ] }

These are saved results. Switching examples runs no model or external service.

Limits of this experiment

  • Processes and object files are local; no remote object storage, vector database or semantic-ranking benchmark.
  • Faults and ordering are deliberately controlled; counts are not reliability estimates.
  • Recovery is authorised by observed process exit. Distributed lease ownership, retention cleanup and host power-loss durability are outside this run.
Inspect the recorded provenance
{
  "source": {
    "article": "https://medium.com/airtable-eng/building-a-resilient-embedding-system-for-semantic-search-at-airtable-d5fdf27807e2",
    "design": "Independent immutable-object and SQL-pointer variation; not Airtable's vector-store implementation",
    "python": "https://docs.python.org/3/library/multiprocessing.html",
    "sqlite": "https://www.sqlite.org/lang_update.html"
  },
  "recording_sha256": "b5c7cc9db05a4444541e94669f6aa14d0c18e2d90da43fba02855cc443bc7016",
  "basis": {
    "engine.py": "5345c0ef1d4ac605a2fc126c671699aa87005a4f189fc2aa8f9f093be9ef555a",
    "run.py": "ea7ea3ef238afd6c08d52c1ae81b210e4188ee0b38944bebfc2594f76a287749",
    "sources.json": "de4c92d3fc755978c5764f61cb6f3b19fdfed5e140df80d76bc6d1de2807cfa8"
  },
  "execution": "Python multiprocessing spawn; SQLite transactions; object flush and fsync; no model calls"
}
Inspect the earlier seven-schedule identity replay

Recorded experiment

What the experiment actually shows

Independent deterministic publication replay. No Airtable system, vector database, embedding provider or semantic-search-quality benchmark.

Data and comparison boundary

Methods compared

Blind publication, index-only read
Each completion replaces a pointer; candidate reads do not enforce source freshness.
Blind publication, freshness-filtered read
Use the same blind writes but reject stale source identity, revision and target configuration.
Guarded publication, freshness-filtered read
Store immutable artifacts, conditionally publish their pointer, then apply the same freshness filter.

Recorded findings

Stale blind index candidates
4 / 7 schedules

Controlled failure examples, not a real-world stale-result rate.

Schedules with a current result after blind publication
3 / 6

Of six schedules ending in an active record; filtering cannot restore a fresh pointer displaced by late completion.

Schedules with a current result after guarded publication
6 / 6

Includes explicitly executed recovery scans; the schedule ending in deletion is excluded.

Inspect a recorded example

An old generation finishes after the new one
Input

[ [ "create", "life-a", "AUM EUR 12 billion" ], [ "snapshot", "old" ], [ "edit", "AUM EUR 14 billion" ], [ "snapshot", "new" ], [ "complete", "new" ], [ "complete", "old" ] ]

Baseline output

{ "index_only": { "status": "stale_candidate", "eligible": true, "body": "AUM EUR 12 billion", "incarnation": "life-a", "revision": 1, "namespace": "model-a:g1", "source_current": false, "reasons": [ "different_revision", "different_body_hash" ] }, "fresh_read": { "status": "held", "eligible": false, "reasons": [ "different_revision", "different_body_hash" ] } }

Candidate output

{ "fresh_read": { "status": "current", "eligible": true, "body": "AUM EUR 14 billion", "incarnation": "life-a", "revision": 2, "namespace": "model-a:g1", "source_current": true, "reasons": [] }, "artifact_count": 2, "before_recovery": [] }

These are saved results. Switching examples runs no model or external service.

Limits of this experiment

  • Completion order is scheduled explicitly; this is not a concurrent service or distributed transaction test.
  • The separate object map is in memory. Garbage collection, durable queues and physical erasure are not implemented.
  • Token-count vectors substitute for model inference. No embedding relevance or model improvement is measured.
  • Strict reads deliberately withhold outdated candidates, creating an availability interval before current work finishes.
Inspect the recorded provenance
{
  "source": {
    "csv": {
      "logical_row_including_header": 352,
      "title": "Building a Resilient Embedding System for Semantic Search at Airtable"
    },
    "primary": {
      "url": "https://medium.com/airtable-eng/building-a-resilient-embedding-system-for-semantic-search-at-airtable-d5fdf27807e2",
      "checked": "2026-12-01",
      "mechanisms": "Asynchronous vector generation, ordered source/persistence state, conditional publication and recovery after configuration changes."
    },
    "boundary": "The prototype independently uses immutable objects plus a SQLite publication pointer. It does not reproduce Airtable's conditional vector-store implementation, its single-writer database, permissions or production metrics."
  },
  "fixture_sha256": "8a3f319e86d971125409a3424dd16356257867df0979ed8efe410b7e0e692215",
  "implementation_sha256": "d1f067851f07d58003399d3992155c2dadaaffe4701cf8315ba085c251ba0ab1",
  "replay_sha256": "861060b6312c0b460d2e0453b23e3a5e0586f889ad25a050660b736eb392b916",
  "vector_method": "Fixed-vocabulary token counts; configuration B uses binary presence",
  "model_calls": 0
}

Connect index freshness to the reporting task

For a financial-document workspace, I would begin by deciding what a reader may receive while a corrected report is being indexed. A current-only policy makes temporary absence visible. A policy permitting an older version would need to expose that version and prevent it from being mistaken for the approved current report. The choice belongs in the application contract.

The source-current check also has a cost: it requires trustworthy source metadata at read time. A stale copy of that metadata cannot establish freshness. The diagram does not solve entitlement checks, retrieval ranking or how a financial figure should be interpreted; those remain separate responsibilities in the surrounding application.

This study complements Finch’s financial context and Ramp’s candidate selection. Even a well-formed query or a correct selector can receive outdated evidence if lifecycle state is lost. Versioning must travel from the original record through generation, publication and the eventual answer’s source reference.

Source credit and offline reproduction

The architecture is an independently drawn study design, with the Airtable article as its design reference. CSV reference: logical row 352, including the header. The fictional report text and event schedules are authored fixtures.

In engineering-lab/persistent-index, python3 run.py verifies and exports the retained worker recording. Run python3 run.py --execute in a separate copy without a recording to execute fresh workers. The original airtable-embeddings/study.py retains the earlier in-memory identity experiment. Both use the standard library, with explicit portable bundle manifests.