All Questions
Elasticsearch medium

A document is deleted, but the total disk usage of the cluster does not immediately decrease. Why?

  1. A Deleted documents are moved to a 'Trash' index for 30 days by default.
  2. B Lucene segments are immutable. Deletions are 'Soft' (tombstones); space is only reclaimed later when segments are merged together into a new file and the old ones are deleted physically.
  3. C The operating system's filesystem cache is masking the change in file size.
  4. D Deletes in Elasticsearch only apply to the Primary Shard, while Replicas keep the data for auditing.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions