mdmarshmallow opened a new pull request, #13951: URL: https://github.com/apache/lucene/pull/13951
### Description <!-- If this is your first contribution to Lucene, please make sure you have reviewed the contribution guide. https://github.com/apache/lucene/blob/main/CONTRIBUTING.md --> Draft PR to outline my initial approach. I introduced `IndexWriterRamManager` to control writer flushes. I also have a function `IndexWriterRamManager#chooseWriterToFlush` that lets the user choose which writer they specifically want to be flushed, sort of like a simple flush policy. Currently it defaults to just choosing the writer with the most RAM usage. One thing I wanted to avoid was starting another thread to just poll the IndexWriter memory usage, so I just added a listener in `IndexWriter#maybeProcessEvents` which is called whenever docs are updated or deleted (`IndexWriterRamManager#flushIfNecessary`). I wanted this method to be called whenever `FlushPolicy#onChange` was called, as I believe they both kinda do the same thing No unit tests yet, but will add them! I just wanted to have my approach sanity checked for now -- 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 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