question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow Document Deletion From Full Shards

See original GitHub issue

Is your feature request related to a problem? Please describe. OpenSearch shards have a 2147483519 doc limit. This is driven by a hard Lucene limit on the number of documents that can exist in a Lucene index.

Once an OpenSearch shard has reached the maximum number of documents, the index begins rejecting document deletions:

GET /_cat/indices/<my index>?v
health status index                 uuid                   pri rep docs.count docs.deleted store.size pri.store.size
green  open   <my index> ne6hnbXiQSOdpxg6zsqPgw   1   1 2147483519            0    569.2gb        284.2gb

DELETE /<my index>/_doc/zpi-oH0Bo4VEviPH9aZC
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "number of documents in the index cannot exceed 2147483519"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "number of documents in the index cannot exceed 2147483519"
  },
  "status" : 400
}

Describe the solution you’d like The ability to delete some docs within the index to free up space. Not sure if there’s a Lucene-level limitation that prevents this behavior.

Describe alternatives you’ve considered N/A

Additional context N/A

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
engechascommented, May 10, 2022

I’m interested in contributing to core OpenSearch and this seems like a good starter issue so I can pick up the PR work when I get some time

0reactions
dblockcommented, May 5, 2022

I’m with @engechas. I vote for a circuit breaker that prevents more documents to be written before users get into the situation of not being able to delete documents in an index. Who cares to PR? 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Remove Shards from an Existing Sharded Cluster - MongoDB
To remove a shard, first connect to one of the cluster's mongos instances using mongosh . Then use the sequence of tasks in...
Read more >
Lucene's Handling of Deleted Documents | Elastic Blog
A deleted document ties up a document ID from the maximum 2.1 B documents for a single shard. If your shard is riding...
Read more >
Shard Management Commands - Apache Solr
DELETESHARD: Delete a Shard​​ Deleting a shard will unload all replicas of the shard, remove them from clusterstate. json , and (by default)...
Read more >
Free up disk space in Amazon OpenSearch service
Expunge the deleted documents · Perform force merge on your cluster only when there is enough free storage space. · The force merge...
Read more >
How to Delete a Document in Elasticsearch Using the API
The delete API allows users to delete an Elasticsearch document from an index based on that document's ID. Users can use the REST...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found