Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 06171200C3C for ; Mon, 3 Apr 2017 19:19:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 04A88160B8F; Mon, 3 Apr 2017 17:19:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 250EB160B8D for ; Mon, 3 Apr 2017 19:19:48 +0200 (CEST) Received: (qmail 83100 invoked by uid 500); 3 Apr 2017 17:19:48 -0000 Mailing-List: contact dev-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list dev@ignite.apache.org Received: (qmail 83088 invoked by uid 99); 3 Apr 2017 17:19:47 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Apr 2017 17:19:47 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 9D918C0635 for ; Mon, 3 Apr 2017 17:19:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id YGCqhzHldQCx for ; Mon, 3 Apr 2017 17:19:45 +0000 (UTC) Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 051015F397 for ; Mon, 3 Apr 2017 17:19:45 +0000 (UTC) Received: by mail-vk0-f54.google.com with SMTP id d188so145414779vka.0 for ; Mon, 03 Apr 2017 10:19:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=t5cWkM/zO9tgE+6/Gsq+CoNZ2k80s3u0ei7QavmWrKU=; b=oql82tJnPLtH/C2vk/Me+e0QvJdooG7q0FmvWvVpy54TQ0Eb+dpZDubxCVg6NnUWVV aRNw/nLP/NFb9Ot/+mehvjSAhpXsj6fcykA3kHVL1PUG1vV4yIclaFAJrVCw06cqlC9/ JDFnXCLa6E+d5W0TCPMlxbhOvhXQrv/sP+aK4uKrJEqN1zvtnp/Ua/sTA8U6ezomj7F1 2TUpveBIh+re0arRBMLZtnJH0njmxYBfgyCnKz01hTdKEV40+yYKo+losfUSHAggpqWb L+V7KeChGLBicocnpmxcUAthtZaZNHUSDGrwWJ++pGGRxR4UGHwMUTUVsaJiVaA/+RLD cxaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=t5cWkM/zO9tgE+6/Gsq+CoNZ2k80s3u0ei7QavmWrKU=; b=pGuhFdMCSdOWx8lW7zFDCJhTFiHmWS4sAl5KGgwS2IZMRnMNYYdSGgR9pagswKeQsU DN4VXTmOwlNIusYijFzQdhVXppXHbDFif2Pksc2tutgUx6RTdj4uyDtyge2haRvqXxJ+ jwtOS16Z5UN9BbtLK5GUg+dBrPoc3MPNpk6io//Rn3zaKy3Dy6dlCT5avDkswgNO82fb iVc2l7gAdMALnjkxfrRrzI+Jv9B5ghk0OfTHjQtyYcwI5XneVg/wI4n7N7FNfYXIMZPc 274tAcWHSWSmMANTsFrxWXjZWl0hGddT8kFJwNdy863C62KWRmFcdtp5/ZuMJVSgkFS0 7uYA== X-Gm-Message-State: AFeK/H327Up34p8CEJ7p/nBScrIwCOIEjzfDyT/74kqbOul48GBd+d/7LIbkLb9/YG/PNscRKKc7X6gv52eykQ== X-Received: by 10.159.55.142 with SMTP id q14mr7194670uaq.40.1491239983615; Mon, 03 Apr 2017 10:19:43 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.1.173 with HTTP; Mon, 3 Apr 2017 10:19:43 -0700 (PDT) In-Reply-To: References: From: Andrey Mashenkov Date: Mon, 3 Apr 2017 20:19:43 +0300 Message-ID: Subject: Fwd: ScanQuery With BinaryObject To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=94eb2c0412767f9b67054c465dcd archived-at: Mon, 03 Apr 2017 17:19:50 -0000 --94eb2c0412767f9b67054c465dcd Content-Type: text/plain; charset=UTF-8 Crossposted to dev: Guys, ScanQuery filter code (see IgniteBiPredicate implementation below) can be cached on server side that can cause unexpected results. The main point here is server node never restarts while client does it with filter code changed. Is it ok? I try to add *serialVersionUID* and it was useless. The only class renaming was helpful. ---------- Forwarded message ---------- From: David Li Date: Mon, Apr 3, 2017 at 9:24 AM Subject: Re: ScanQuery With BinaryObject To: user@ignite.apache.org Sorry, please ignore the previous email, it was sent by mistake. 1. I download apache-ignite-fabric-1.9.0-bin.zip, and unzip it. 2. In terminal, I start an ignite instance by *bin/ignite.sh examples/config/example-ignite.xml* 3. I create a Java application, source code as below: public static void main(String[] args) { String ORG_CACHE = "org_cache_remote"; * Ignition.setClientMode(true);* Ignite ignite = Ignition.start("example-ignite.xml"); CacheConfiguration orgCacheCfg = new CacheConfiguration<>(ORG_CACHE); orgCacheCfg.setIndexedTypes(Long.class, Organization.class); ignite.destroyCache(ORG_CACHE); IgniteCache cache = ignite.createCache(orgCacheCfg); cache.put(1L, new Organization(1L, "org1", true, "jurong east", "1111")); cache.put(2L, new Organization(2L, "org2", false, "orchard", "2222")); cache.put(3L, new Organization(3L, "org3", true, "jurong west", "3333")); cache.put(4L, new Organization(4L, "org4", false, "woodlands", "4444")); cache.put(5L, new Organization(5L, "org5", false, "changi", "5555")); // cache.put(6L, new Organization(6L, "org6", true, "jurong island", "6666")); IgniteCache binaryCache = cache.withKeepBinary(); List> result; System.out.println("Scan by address"); ScanQuery scanAddress = new ScanQuery<>( new IgniteBiPredicate() { @Override public boolean apply(Long aLong, BinaryObject binaryObject) { *// first time filter by jurong, got two entries, org1 and org3* * // second time filter by changi, got two entries, org1 and org3* * // third time filter by changi as well, uncomment org6, got three entries, org1, org3 and org6* * return binaryObject.field("address").startsWith("jurong");* } } ); result = binaryCache.query(scanAddress).getAll(); System.out.println("result: " + result.size()); for (Cache.Entry entry : result) { System.out.println(entry.getValue().deserialize().toString()); } ignite.close(); } Here what I want to do is start a client node, connect to the server node started in step 2. Then I create a cache, put some data inside, then try to run a scan query to find entries by its address. The problem is when I run this program first time, it will return two entries, their addresses are started with "jurong", which is correct. When I run the program again, with changed value, eg. "changi", it should return one entry, somehow, it still return two entries with address started with "jurong", rather than "changi". When I uncomment the line of "org6", and run the program again, it will return three entries, all of their addresses are started with "jurong". I have no idea what is going on. -- Best regards, Andrey V. Mashenkov --94eb2c0412767f9b67054c465dcd--