ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitriy Setrakyan <dsetrak...@apache.org>
Subject Re: GridCacheAdapter#size() has O(n) complexity
Date Mon, 26 Jun 2017 14:56:06 GMT
On Mon, Jun 26, 2017 at 2:31 AM, Yakov Zhdanov <yzhdanov@apache.org> 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 API? Any thoughts here?
>

Completely agree. Cache size should not include near size. Near size should
be a separate count. The size, on the other hand, should always return the
actual size of the cache on the server side.


>
> As far as the original issue I would not bother with validity check on
> getting size and just return raw map size.
>

Agree.


>
> --Yakov
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message