ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] zzzadruga commented on a change in pull request #3: IGNITE-9333 Add statistics page
Date Thu, 06 Sep 2018 08:59:03 GMT
zzzadruga commented on a change in pull request #3: IGNITE-9333 Add statistics page
URL: https://github.com/apache/ignite-teamcity-bot/pull/3#discussion_r215547228
 
 

 ##########
 File path: ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
 ##########
 @@ -290,14 +298,16 @@ private IgnitePersistentTeamcity(Ignite ignite, IgniteTeamcityHelper
teamcity) {
 
                 return mergeByIdToHistoricalOrder(persistedValue, builds);
             });
+
+        return buildRefs.stream().skip(cnt < buildRefs.size() ? buildRefs.size() - cnt
: 0).collect(Collectors.toList());
 
 Review comment:
   If the cache contains more records than requested, then skip the unnecessary. 
   
   For example, there are 100 entries in the cache and our request requires 10 entries. In
the final collection will be placed 100 entries from the cache, 10 entries from the apache
server (the most likely will be overwrite of the cache entries), the collection will be placed
in the cache (~ 100-103 records) and will be returned. But we only need 10 records, so 90
entries will be skipped.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message