It is weird.

I run the cache query example, scan query works fine.

I create my cache query code with a local started server node, scan query
works fine.

I start a server node from terminal, start a client node in my code and
issue scan query, the first query after the server node is started works
fine, all the following queries will just return the exactly same result as
the first query. I try adding data into the cache, the newly added data
will be returned as per the first query. It looks like the first query has
been kept somewhere.




On Thu, Mar 30, 2017 at 9:02 PM, Andrey Mashenkov <
andrey.mashen...@gmail.com> wrote:

> Hi David,
>
> I've run your code and it works fine for me on ignite 1.7-1.9 versions and
> master branch.
>
> On Thu, Mar 30, 2017 at 12:19 PM, David Li <david.li...@gmail.com> wrote:
>
>> Hello,
>>
>> I am having a little issue with the ScanQuery for BinaryObject.
>>
>> Some code snippets
>>
>> IgniteCache<Long, Organization> cache = ignite.cache(CacheConfig.CACHE_NAME);
>> IgniteCache<Long, BinaryObject> binaryCache = cache.withKeepBinary();
>>
>> // scan query
>> IgniteBiPredicate<Long, BinaryObject> filter = new IgniteBiPredicate<Long, 
>> BinaryObject>() {
>>     @Override
>>     public boolean apply(Long key, BinaryObject value) {
>>         return false;
>>     }
>> };
>> ScanQuery<Long, BinaryObject> scanQuery = new ScanQuery<>(filter);
>>
>> List<Cache.Entry<Long, BinaryObject>> result = 
>> binaryCache.query(scanQuery).getAll();
>>
>>
>> I expect it will return an empty result, somehow it always returns 
>> everything in the cache.
>>
>> Not sure what is wrong?
>>
>>
>> BRs,
>>
>> David
>>
>>
>>
>>
>
>
> --
> Best regards,
> Andrey V. Mashenkov
>

Reply via email to