vigyasharma opened a new issue, #14515: URL: https://github.com/apache/lucene/issues/14515
IndexWriter provides a `forceMergeDeletes` API which triggers force merging of all segments that have deleted documents, allowing users to expunge deletes up to a configurable delete percentage (set via `setForceMergeDeletesPctAllowed()`). The API provides a blocking variant, which waits until the merges complete, and a non-blocking variant, that starts the merges in background threads and returns. For the non-blocking version, it would be nice to have the ability to monitor if merges have completed. Turns out, all we need for this, is to return the `MergeSpecification` that defines the merges triggered by the API. Indeed, the blocking variant of this API itself uses this spec to wait until all merges have completed. This is what would happen if you were using the `ConcurrentMergeScheduler` which will start merges in background, but invoked the API with `doWait=true`. However, there are benefits to being able to monitor from outside the API, like waiting only unto a max timeout, or reporting metrics on the progress of these merges. The change here is to change this API return type from void to `MergePolicy.MergeSpecification` and return the `spec` object. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org