From issues-return-101523-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Fri Nov 15 11:49:02 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9DF52180658 for ; Fri, 15 Nov 2019 12:49:02 +0100 (CET) Received: (qmail 77203 invoked by uid 500); 15 Nov 2019 11:49:02 -0000 Mailing-List: contact issues-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 issues@ignite.apache.org Received: (qmail 77178 invoked by uid 99); 15 Nov 2019 11:49:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Nov 2019 11:49:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id EEABCE2BE9 for ; Fri, 15 Nov 2019 11:49:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 067FE7802DF for ; Fri, 15 Nov 2019 11:49:00 +0000 (UTC) Date: Fri, 15 Nov 2019 11:49:00 +0000 (UTC) From: "Matija Polajnar (Jira)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (IGNITE-12375) Inconsistent persistent cache behaviour: containsKey returns false on a key returned by iterator MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Matija Polajnar created IGNITE-12375: ---------------------------------------- Summary: Inconsistent persistent cache behaviour: containsKey = returns false on a key returned by iterator Key: IGNITE-12375 URL: https://issues.apache.org/jira/browse/IGNITE-12375 Project: Ignite Issue Type: Bug Affects Versions: 2.7.6, 2.7 Reporter: Matija Polajnar Attachments: ignite-bug.zip On a fairly complex spring boot application using embedded Ignite persisten= t storage, we've managed (multiple times) to get into a situation where som= e persistent caches start behaving weirdly.=C2=A0The symptoms are such: cac= hes'=C2=A0{{iterator()}}=C2=A0method returns the elements we previously put= into caches as expected. {{size()}} also returns the expected value. But {= {containsKey(x)}} and {{get(x)}} return {{false}} and {{null}} respectively= for some (or all) keys that are expected to be in the cache and are even r= eturned by the {{iterator()}}. The problem never starts occurring mid-run, but always after cluster restar= ts; not at all always, and we suspect a necessary precondition is that cach= e configurations are slightly changed, like having modified QueryEntities a= nd such. We also suspect this only happens on single-node clusters, so it m= ight be related to=C2=A0IGNITE-12297, but the workaround that works for tha= t problem does not fix the problem described here. The caches in question then cannot be repaired short of destroying and re-c= reating them and re-importing data. =C2=A0 We tried and failed to reproduce the problem from scratch in a small demo a= pplication. We managed, however, to grab a {{work}} directory from our appl= ication after corruption and then create a demo application with a minimal = set of classes needed to demonstrate the issue on reading (after corruption= is already present). I'm attaching a zip file with the code (along with a maven pom.xml) and the= corrupted work directory. You can directly execute the demo by issuing {{m= vn compile exec:java}}, which will execute the {{care.better.demo.ignitebug= .BugApp}}=C2=A0class. In this class there's this method: {code:java} private static void replicateProblem(IgniteCache cache)= { int seen =3D 0; Iterator> entryIterator =3D cache.itera= tor(); while (entryIterator.hasNext()) { Object key =3D entryIterator.next().getKey(); if (!cache.containsKey(key) || cache.get(key) =3D=3D null) { LOG.error("UNSEEN KEY: {}", key); } else { seen++; } } LOG.info("Size {}, seen {}.", cache.size(), seen); } {code} =C2=A0 After execution you will note log records like this one: ERROR care.better.= demo.ignitebug.BugApp.replicateProblem - UNSEEN KEY: QueueKey{affinityKey= =3DPartyIdArg{namespace=3D'=D0=AD=D0=9C=D0=98=D0=90=D0=A1 =D0=9C=D0=B5=D0= =B4=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=BD=D0=B8=D0=BA=D0=B8', id=3D'222'}, en= tryId=3Dc059b587-78d3-4c75-b64f-8575ae3d2318} We had no success in trying to find any lead while debugging through Ignite= source code so we kindly ask your assistance in hunting down this bug and,= until it is fixed, suggesting any possible work-around should this occur i= n a production environment (it has not so far) where it is not practical to= dump all data from some cache into a file to be able to destroy, re-create= and re-import it. -- This message was sent by Atlassian Jira (v8.3.4#803005)