reschke commented on code in PR #70:
URL: 
https://github.com/apache/sling-org-apache-sling-resourceresolver/pull/70#discussion_r915790941


##########
src/main/java/org/apache/sling/resourceresolver/impl/mapping/MapEntries.java:
##########
@@ -709,10 +718,38 @@ public Map<String, List<String>> getVanityPathMappings() {
     private List<MapEntry> getMapEntryList(String vanityPath) {
         List<MapEntry> mapEntries = null;
 
-        if (!vanityPathsProcessed.get() || 
BloomFilterUtils.probablyContains(vanityBloomFilter, vanityPath)) {
+        boolean initFinished = vanityPathsProcessed.get();
+        boolean probablyPresent = false;
+
+        if (initFinished) {
+            // total number of lookups after init (and when cache not complete)
+            long current = this.vanityPathLookups.incrementAndGet();
+            if (current >= Long.MAX_VALUE - 100000) {
+                // reset counters when we get close the limit
+                synchronized (this) {

Review Comment:
   ack
   



-- 
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]

Reply via email to