Andrey Velichko created IGNITE-3373:
---------------------------------------

             Summary: Distributed IgniteSet shows size() == 0 for any new node
                 Key: IGNITE-3373
                 URL: https://issues.apache.org/jira/browse/IGNITE-3373
             Project: Ignite
          Issue Type: Bug
            Reporter: Andrey Velichko


For distributed IgniteSet new node shows incorrdet set size
igniteSet.size() == 0 shows 0, 

        CollectionConfiguration collectionConfiguration = new 
CollectionConfiguration();
        collectionConfiguration.setCollocated(true); 

        IgniteSet<Long> numbers = ignite.set("numbers", null);
        if (numbers == null) {
            System.out.println("[local] creating collection [numbers]");
            numbers = ignite.set("numbers", collectionConfiguration);
        }

        boolean cont = numbers.contains(42L);   // true - OK
        int num = numbers.size();               // 0 Error ???
        System.out.println("size=" + num + ", contains=" + cont);

        numbers.forEach(val -> {
            System.out.println(val); // Iterator is not iterate :(
        });

        numbers.add(42L);
        Thread.sleep(1000 * 6000);



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to