You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by GitBox <gi...@apache.org> on 2018/09/06 08:59:03 UTC

[GitHub] zzzadruga commented on a change in pull request #3: IGNITE-9333 Add statistics page

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