skip to content

A deleted vector no longer appears in search results but stays on disk until compaction: what does that mean for a data erasure request?

level: middleimportance: should knowfreq 35%

answer

  1. hidden is not erased
  2. tombstone or deletion bitmap
  3. payload often holds raw text
  4. compaction thresholds, old versions
  5. evidence per stage

basics

~20 s

Hidden is not erased. A tombstone stops searches returning the record, but its vector and stored text stay in segment files, and often in older versions and logs, until compaction and cleanup run; erasure is complete only after that.

solid answer

~40 s

A delete on many vector stores writes a **tombstone** or a deletion-bitmap bit, so every search filters the record out while its bytes, including the payload that often holds the chunk's raw text, stay in the segment file. Those bytes go only when **compaction** rewrites the segment and the old file is removed, and many stores compact only past a deleted-fraction threshold or on a schedule. Older table versions, the write-ahead log and each replica keep their own copies until their cleanup runs. For an erasure request I would delete and prove the record hidden, force or schedule compaction of the affected segments, expire old versions and logs, purge caches, and record evidence for each stage, so the privacy owner knows what is done and what is pending.

go deeper

for a junior

Recall that a delete on many stores hides a record with a tombstone and that the bytes stay on disk until compaction rewrites the file.

for a middle

Explain what triggers compaction, why one delete may not trigger it, and which other copies - versions, logs, replicas - outlive the tombstone.

for a senior

Lay out the erasure stages with evidence for each, force or bound compaction for collections holding personal data, and keep caches in scope.

for a principal

Agree with the privacy owner what erased means and set compaction and retention so its deadline is met by design, not by luck.

## Hiding a record versus removing it Many vector stores write data into **segments**: files that are immutable once sealed, each holding a batch of vectors, their payloads (often including the chunk's raw text) and an index over them. Rewriting a segment to drop one record is expensive, so a delete usually does something cheaper: - it writes a **tombstone**, or sets the record's bit in a **deletion bitmap**, so every lookup and search filters the record out; - it leaves the record's bytes - vector, payload, text - inside the segment file. From the user's side the record is gone. From the disk's side nothing has changed yet. The bytes go only when **compaction** (also called merging or vacuuming, depending on the store) rewrites the segment without the deleted records and the old file is removed. What tombstones do to a graph index's recall and when to rebuild it is an index-maintenance subject; here the question is only where the data still lives. ## When the bytes actually go Several independent things have to happen, and stores differ in which of them apply: - **Compaction triggers.** Many stores compact a segment only when its deleted fraction crosses a threshold, when segments are small enough to merge, on a schedule, or on an explicit request. A single delete in a large, otherwise live segment may not trigger a rewrite for a long time. - **Old files are removed.** After compaction, the old segment may stay on disk until readers using it finish or a cleanup pass runs. - **Older versions expire.** Stores that keep table versions for time travel or rollback keep files referenced by older versions until a version cleanup runs. - **The log rolls over.** The write-ahead log holding the original insert is retained until it is truncated. - **Replicas may each do it separately.** Where every replica keeps its own files, compacting one does nothing for the others. Backups and snapshots taken before the delete are a further copy, governed by the recovery and retention policy rather than by the live store. ## Why this matters for an erasure request A data-protection **erasure request** asks for a person's data to be removed, not hidden. In many jurisdictions such requests carry obligations and response deadlines; the privacy or legal owner decides what "erased" covers and when it must be done, and a lawyer reads the actual rules. The engineering job is to tell that owner the truth about each stage: - the payload frequently stores the chunk's text verbatim, so a tombstoned record can still hold the exact sentences the request is about; - the vector is derived from that text, and research shows embeddings can leak some of their input, so treating a vector as anonymous is unsafe; - "search no longer returns it" is true minutes after the delete, while "no file holds it" may be true only after compaction, cleanup and log rollover. ## Closing the gap 1. **Delete and prove it hidden** on every replica, so no user sees it. 2. **Force or schedule compaction** of the affected segments where the store allows it, or lower the deleted-fraction threshold for collections that hold personal data, so the rewrite happens within a known bound. 3. **Expire older versions and truncate logs** on a schedule that fits the erasure deadline. 4. **Purge caches** and derived copies built from the record. 5. **Record evidence per stage**, so the answer to "is it erased?" names what is done and what is still pending. | Stage | What is true | Evidence | |---|---|---| | Tombstoned | no search or lookup returns it | per-replica exact read-back | | Compacted | live segments no longer contain it | compaction run covering the segment, per replica | | Versions and logs expired | no older version or log entry references it | cleanup and truncation runs past the delete | | Backups aged out | no retained backup contains it | the backup retention schedule | The honest summary is that erasure on a tombstoning store is a process with a duration, not a single call, and the team should know that duration before anyone promises one.

  • Why might a single deleted vector stay on disk for weeks?
    Many stores compact a segment only when its deleted fraction crosses a threshold, or on a schedule, because rewriting a segment and its index is expensive. One delete in a large, otherwise live segment may never cross that threshold, so a team with erasure deadlines needs a forced compaction, a lower threshold for those collections, or a periodic sweep.
  • Is removing the payload text enough if the vector stays on disk?
    Not safely. The vector is derived from the text, research shows embeddings can leak some of their input, and the same text may sit in other fields or files. Treat the vector and its payload as one record to erase, and let the privacy owner decide what the obligation covers.

Striking a line through an entry in a bound ledger: nobody reading the ledger will act on that entry, but the ink is still on the page until the page is recopied without it and the old page is shredded, and any photocopies made earlier still show it.

  • Once search stops returning the record, its data has been erased.
  • Compaction runs right after every delete, so the gap is negligible.
  • Removing the payload text is enough, because a vector reveals nothing.
  • Nothing outside the live segments, such as logs or older versions, can hold it.
  • Older table versions are discarded automatically the moment a delete applies.