Allow Document Deletion From Full Shards
See original GitHub issueIs 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:
- Created a year ago
- Comments:6 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
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? 😃