steffenvan commented on code in PR #1691:
URL: https://github.com/apache/jackrabbit-oak/pull/1691#discussion_r1746617189
##########
oak-run-commons/src/main/java/org/apache/jackrabbit/oak/index/indexer/document/flatfile/FlatFileStoreIterator.java:
##########
@@ -121,8 +121,8 @@ protected NodeStateEntry computeNext() {
private NodeStateEntry computeNextEntry() {
if (!buffer.isEmpty()) {
if (buffer.size() > maxBufferSize || buffer.estimatedMemoryUsage()
> maxBufferSizeBytes) {
- maxBufferSize = buffer.size();
- maxBufferSizeBytes = buffer.estimatedMemoryUsage();
+ maxBufferSize = Math.max(buffer.size(), maxBufferSize);
Review Comment:
Im not against this change, but I'm wondering if it strictly necessary?
Seems like the `bufferSize` will be larger than `maxBufferSize` if we enter
this condition either way.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]