akalash commented on a change in pull request #3: IGNITE-9333 Add statistics 
page
URL: https://github.com/apache/ignite-teamcity-bot/pull/3#discussion_r214714321
 
 

 ##########
 File path: 
ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
 ##########
 @@ -240,14 +243,14 @@ private IgnitePersistentTeamcity(Ignite ignite, 
IgniteTeamcityHelper teamcity) {
         return loaded;
     }
 
-    private <K, V> V timedLoadIfAbsentOrMerge(IgniteCache<K, Expirable<V>> 
cache, int seconds, K key,
+    private <K, V> V timedLoadIfAbsentOrMerge(IgniteCache<K, Expirable<V>> 
cache, int seconds, long cnt, K key,
         BiFunction<K, V, V> loadWithMerge) {
         @Nullable final Expirable<V> persistedBuilds = cache.get(key);
 
         int fields = ObjectInterner.internFields(persistedBuilds);
 
         if (persistedBuilds != null) {
-            if (persistedBuilds.isAgeLessThanSecs(seconds))
+            if (persistedBuilds.isAgeLessThanSecs(seconds) && 
persistedBuilds.isLastCntGreaterThanCurrentCnt(cnt))
 
 Review comment:
   Method name "isLastCntGreaterThanCurrentCnt" is not clear for me, I can't 
catch which is last cnt and which is current cnt. Maybe better something like 
"hasCounterGreaterThan"?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to