[
https://issues.apache.org/jira/browse/IGNITE-512?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14960353#comment-14960353
]
Yakov Zhdanov commented on IGNITE-512:
--------------------------------------
Pure client node (no data, no near cache) should throw exception on this call.
As reported by William on dev list:
I never filed a ticket, but for what it's worth, I tried using this method
in a test scenario just last week from a _client_ node and it never
returned (i.e., blocked forever).
> IgniteCache.randomEntry() is implemented incorrectly.
> -----------------------------------------------------
>
> Key: IGNITE-512
> URL: https://issues.apache.org/jira/browse/IGNITE-512
> Project: Ignite
> Issue Type: Bug
> Components: cache
> Affects Versions: sprint-1
> Reporter: Vladimir Ozerov
>
> 1) It may return null if randomly picked entry is obsolete, which violates
> method semantics described in JavaDocs: it should return null ony in case
> cache is empty.
> 2) It may return not-null for empty cache. E.g., put several falues to it,
> then call removeAll(), then call randomEntry() - you may got value even after
> removal. Looks like "isObsolete" check is not enough.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)