ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Ozerov (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-1012) Not all entries are returned by scan query in case of concurrent partition exchange.
Date Fri, 12 Jun 2015 08:27:00 GMT
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)

Mime
View raw message