Re: GridCacheAdapter#size() has O(n) complexity

2017-06-26 Thread Dmitriy Setrakyan
On Mon, Jun 26, 2017 at 2:31 AM, Yakov Zhdanov wrote: > Guys, I see little inconsistency. Imagine user does 1000 puts with near > cache enabled. Then user does some gets() and size() returns 1000 + N, more > gets() and size() is 1000 + M. This is a bit weird. Can we have nearSize() > on public AP

Re: GridCacheAdapter#size() has O(n) complexity

2017-06-26 Thread Yakov Zhdanov
Guys, I see little inconsistency. Imagine user does 1000 puts with near cache enabled. Then user does some gets() and size() returns 1000 + N, more gets() and size() is 1000 + M. This is a bit weird. Can we have nearSize() on public API? Any thoughts here? As far as the original issue I would not

Re: GridCacheAdapter#size() has O(n) complexity

2017-06-23 Thread Dmitriy Setrakyan
Hm... why not just return the key count? Can we really have nulls in the near cache? On Fri, Jun 23, 2017 at 8:25 PM, Mikhail Cherkasov wrote: > Hi all, > > GridCacheAdapter#size() has O(n) complexity and this can lead for delays > during metric collection( https://issues.apache.org/ > jira/brow