You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2015/06/12 10:27:00 UTC
[jira] [Created] (IGNITE-1012) Not all entries are returned by scan
query in case of concurrent partition exchange.
Vladimir Ozerov created IGNITE-1012:
---------------------------------------
Summary: Not all entries are returned by scan query in case of concurrent partition exchange.
Key: IGNITE-1012
URL: https://issues.apache.org/jira/browse/IGNITE-1012
Project: Ignite
Issue Type: Bug
Components: cache
Affects Versions: sprint-4
Reporter: Vladimir Ozerov
Priority: Critical
Fix For: sprint-7
The problem can be reproduced using two nodes with partitioned cache and the following code snippet:
{code}
Ignite grid = Ignition.ignite("grid-0");
IgniteCache cache = grid.cache("cache");
Affinity aff = grid.affinity("cache");
// Populate.
Set<Integer> data = new HashSet<>();
for (int i = 0; i < 100; i++) {
cache.put(i, i);
data.add(i);
}
// Check.
for (int part = 0; part < aff.partitions(); part++) {
Set<Integer> partData = new HashSet<>();
for (Integer key : data) {
if (aff.partition(key) == part)
partData.add(key);
}
ScanQuery qry = new ScanQuery(part);
List<Cache.Entry<Integer, Integer>> qryData = cache.query(qry).getAll();
for (Cache.Entry<Integer, Integer> entry : qryData)
partData.remove(entry.getKey());
assert partData.isEmpty() : "Expected partition keys: " + partData;
}
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)