From issues-return-60393-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Sun Apr 1 18:32:10 2018 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 95D1F180675 for ; Sun, 1 Apr 2018 18:32:09 +0200 (CEST) Received: (qmail 14195 invoked by uid 500); 1 Apr 2018 16:32:03 -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 14175 invoked by uid 99); 1 Apr 2018 16:32:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Apr 2018 16:32:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id D28761A0631 for ; Sun, 1 Apr 2018 16:32:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -102.311 X-Spam-Level: X-Spam-Status: No, score=-102.311 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 1rqoiUPv5ocA for ; Sun, 1 Apr 2018 16:32:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 728D25F23D for ; Sun, 1 Apr 2018 16:32:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id AD427E0179 for ; Sun, 1 Apr 2018 16:32:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 344A225602 for ; Sun, 1 Apr 2018 16:32:00 +0000 (UTC) Date: Sun, 1 Apr 2018 16:32:00 +0000 (UTC) From: "Pavel Pereslegin (JIRA)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (IGNITE-8092) Put operation may hang if cache was destroyed asynchronously. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Pavel Pereslegin created IGNITE-8092: ---------------------------------------- Summary: Put operation may hang if cache was destroyed asynchronously. Key: IGNITE-8092 URL: https://issues.apache.org/jira/browse/IGNITE-8092 Project: Ignite Issue Type: Bug Components: cache Affects Versions: 2.4 Reporter: Pavel Pereslegin If there is more than one cache in the cache group then put operation on cache may hang if it was destroyed asynchronously. For now this applies to all cache modes (PARTITIONED/REPLICATED/LOCAL) and to all atomicity modes (ATOMIC/TRANSACTIONAL). This problem can not be reproduced if there is only one cache in the cache group. Reproducer: {code:java} public class DestroyCacheTest extends GridCommonAbstractTest { private CacheConfiguration ccfg(String name, String grp) { return new CacheConfiguration(name).setCacheMode(CacheMode.PARTITIONED) .setAtomicityMode(CacheAtomicityMode.TRANSACTIONAL) .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC) .setGroupName(grp); } public void testDestroyAsync() throws Exception { String grpName = "testGroup"; try (IgniteEx node = startGrid(0)) { node.createCache(ccfg("cache2", grpName)); for (int n = 0; n < 100; n++) { IgniteCache cache1 = node.createCache(ccfg("cache1", grpName)); AtomicInteger cntr = new AtomicInteger(); GridTestUtils.runMultiThreadedAsync(() -> { try { int key; while ((key = cntr.getAndIncrement()) < 10_000) { if (key == 1000) cache1.destroy(); cache1.putIfAbsent(key, true); } } catch (Exception ignore) { log.warning(ignore.getMessage()); } return null; }, 6, "put-thread").get(); } } } } {code} p.s. for ATOMIC cache additional cache status check in GridCacheGateway#onStopped busy wait resolve this problem. -- This message was sent by Atlassian JIRA (v7.6.3#76005)