Elasticsearch cluster.indices.tombstones.size Setting

Pulse - Elasticsearch Operations Done Right

On this page

Example Common Issues or Misuses Do's and Don'ts Frequently Asked Questions

The cluster.indices.tombstones.size setting in Elasticsearch controls the maximum number of deleted indices that are retained in the cluster state. These retained deleted indices are known as "tombstones" and play a crucial role in managing cluster consistency during index deletions.

  • Default Value: 500
  • Possible Values: Any positive integer
  • Recommendation: The default value is suitable for most clusters. Increase only if necessary for large, frequently changing clusters.

This setting determines how many recently deleted indices the cluster will remember. Tombstones are essential for ensuring that all nodes in the cluster are aware of index deletions, preventing potential issues with stale data or conflicting index creations.

Example

To change the cluster.indices.tombstones.size setting using the cluster settings API:

PUT _cluster/settings
{
  "persistent": {
    "cluster.indices.tombstones.size": 1000
  }
}

You might want to increase this value in a large cluster with frequent index deletions to ensure proper cleanup across all nodes. However, be cautious, as a larger value increases the cluster state size and may impact performance.

Common Issues or Misuses

  • Setting the value too low can lead to issues with index recreation and potential data inconsistencies across nodes.
  • Setting the value unnecessarily high can bloat the cluster state, potentially impacting cluster performance and stability.

Do's and Don'ts

  • Do monitor the number of tombstones in your cluster regularly.
  • Do increase the value if you frequently encounter issues with index recreation shortly after deletion.
  • Don't set this value excessively high without a specific need, as it can negatively impact cluster performance.
  • Don't ignore warnings related to tombstone limits in your logs.

Frequently Asked Questions

Q: What happens if the tombstone limit is reached?
A: When the limit is reached, the oldest tombstones are automatically removed. This can potentially lead to issues if a node that was offline for a long time rejoins the cluster.

Q: How does this setting affect cluster performance?
A: A higher value increases the size of the cluster state, which is replicated across all nodes. This can lead to increased memory usage and longer cluster state updates.

Q: Can I set this value to 0 to disable tombstones?
A: It's not recommended to set this to 0 as it can lead to serious cluster consistency issues. Always maintain a reasonable number of tombstones.

Q: How often should I adjust this setting?
A: This setting typically doesn't require frequent adjustments. Only modify it if you're experiencing specific issues related to index deletions or recreations.

Q: Is there a way to view the current tombstones in my cluster?
A: Yes, you can use the Cluster State API to view the current tombstones. Look for the "tombstones" section in the API response.

Subscribe to the Pulse Newsletter

Get early access to new Pulse features, insightful blogs & exclusive events , webinars, and workshops.