Zenaique

Fill in the missing term in this description of how HNSW handles deletes.

Fill in blank·Easy·4.0 · 0·~1 min
Attempt it
In HNSW, a delete does not physically remove the node from the graph. The vector is marked with a and skipped at query time, until a rebuild or compaction reclaims the space.
Quick reference
TL;DR

The answer is tombstone: a logical-delete marker that leaves the node in the graph until compaction reclaims it.

Memory aid
Sign in for the mnemonic that makes this stick. See Pro pricing.
Easy to grasp

Think of a cemetery. The person is gone but their stone is still standing on the same plot. Anyone walking through the cemetery sees the marker but knows nobody is home. Vector databases use the same trick: deletions get a marker that says nothing live is here, but the structure stays in place because pulling it out would mean redoing the paths every other stone takes. A groundskeeper comes by occasionally and reorganizes whole sections, which is the compaction step that finally reclaims the space.

Key concepts
Detailed answer & concept explanation
~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.

Sign in for 5 free unlocks/day or go Pro for unlimited. See Pro pricing.
Quick scan · 2–4 min

Everything important, quickly.

4 minutes: name the term, explain why HNSW uses logical deletion, connect to LSM heritage, and finish with the operational consequences.

Real-world examples

Real products, models, and research that use this idea.

  • Cassandra writes tombstone cells for deletes; the same term and pattern are inherited by Milvus and Qdrant for vector deletions
  • RocksDB merges tombstones during compaction; vector engines that wrap RocksDB inherit the behavior for delete reclamation
  • Weaviate emits a tombstone-count metric per shard so operators can monitor accumulation before recall degrades
  • Vespa documentation describes attribute and document-store tombstones with explicit guidance on compaction tuning for write-heavy feeds
Interviewer follow-ups

What an interviewer would ask next. Try answering before peeking at the approach.

QHow does the tombstone pattern interact with strong-consistency reads in a replicated cluster?
Sign in or go Pro to see the approach for this follow-up.
QCould a vector engine use physical deletion instead of tombstones? What would it cost?
Sign in or go Pro to see the approach for this follow-up.
Don't say this

Red flags and common mistakes that signal junior thinking. Click to expand.

Most common mistake

Calling the marker a delete flag and stopping there. The interview word is tombstone, and naming it correctly is a signal you have seen the term in production database design, not just in a tutorial.

Sign in or go Pro to see all red flags and common mistakes. See Pro pricing.
60-second cheat sheet

The night-before-the-interview bullets. Scan these on the way to the call.

Sign in for 5 unlocks/day or go Pro for unlimited revision sheets. See Pro pricing.
References

Primary sources. Skim if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
HNSW vs IVF, when do you pick each for a production vector index?
Flashcard·Medium