mdmarshmallow commented on PR #13951: URL: https://github.com/apache/lucene/pull/13951#issuecomment-2436487725
> Thanks for looking into it. It feels like there should be closer integration between this and the existing `FlushPolicy`/`FlushByRamOrCountsPolicy`? So I actually had the same thought, but when I took a look at `FlushPolicy`, it seemed very geared towards DW/DWPT, IE: ``` public abstract void onChange( DocumentsWriterFlushControl control, DocumentsWriterPerThread perThread); ``` I couldn't think of a clean way to integrate the two... but I'll give it some more thought > I think we'll also want to look into the performance overhead of this. It's likely not good to iterate over tens of IndexWriters on every indexed document to check if the total buffer usage is above the limit? Ah I thought that the `ramBytesUsed()` call was cheap but looks like `AtomicLong#get()` is called under the hood so I'll see if there's a better way to do this. I agree though that performance testing this change makes sense - I haven't quite thought about how to do it though -- 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