HyemIin commented on code in PR #1700:
URL: https://github.com/apache/stormcrawler/pull/1700#discussion_r2452059079
##########
external/opensearch/src/main/java/org/apache/stormcrawler/opensearch/persistence/StatusUpdaterBolt.java:
##########
@@ -160,11 +159,16 @@ public void prepare(
fieldNameForRoutingKey = fieldNameForRoutingKey.replaceAll("\\.",
"%2E");
}
- waitAck =
- Caffeine.newBuilder()
- .expireAfterWrite(60, TimeUnit.SECONDS)
- .removalListener(this)
- .build();
+ String defaultSpec =
String.format("maximumSize=10000,expireAfterWrite=%ds",
Review Comment:
I was considering a scenario where waitAck entries might not be properly
removed due to an unknown issue in the ACK handling logic, which could cause
the cache to grow indefinitely and potentially lead to an OOM (OutOfMemory)
error. In that sense, maximumSize could serve as a last line of defense.
However, since such a situation is highly unlikely in practice, I agree that
it’s unnecessary and removing it, as you suggested, is the right approach.
--
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]