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 E2934200C47 for ; Thu, 30 Mar 2017 10:55:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id E12E4160B8B; Thu, 30 Mar 2017 08:55:40 +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 3412E160B78 for ; Thu, 30 Mar 2017 10:55:40 +0200 (CEST) Received: (qmail 54695 invoked by uid 500); 30 Mar 2017 08:55:39 -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 54677 invoked by uid 99); 30 Mar 2017 08:55:38 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Mar 2017 08:55:38 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 1B79218610E for ; Thu, 30 Mar 2017 08:55:38 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.382 X-Spam-Level: X-Spam-Status: No, score=0.382 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_REPLY=1, HTML_MESSAGE=2, PLING_QUERY=0.279, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ZRRPjRGpDA4A for ; Thu, 30 Mar 2017 08:55:37 +0000 (UTC) Received: from mail-vk0-f43.google.com (mail-vk0-f43.google.com [209.85.213.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B4B5B5FBCA for ; Thu, 30 Mar 2017 08:55:36 +0000 (UTC) Received: by mail-vk0-f43.google.com with SMTP id r69so46460731vke.2 for ; Thu, 30 Mar 2017 01:55:36 -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=bOqAjeh8yUUKBBc/Ip6N0QHF7dg1KpkosW6s25B4qzU=; b=inUWUTnqBOuTZwvD0pjMAKNEuGiY3JqEnXFyHyjGLZYvUXecDL2LxdaGzHKEB6t1Ri 4Q4ab73BVbxg8EsbWxVPwWtQLaECnVkCF4pj+Mqxy8JHiGXgNR+En4+VFjsP66YuvG7/ J/VsniEy4MPOlv7xk3ji/wIorQeCP+scShLexCnFFjnf7rnarsIYGqd+ysq7GckVMQEQ EsdwmPQXSoYk2ueg8dqtDgieuXSDkV3s1dPr34se/xOKAgnWtXqRsGlfHzVQODGC6UOO VNLoPCn+sWLSJ9seA3J4V2MB5T7puc4luKTdGtLaX+IEnmWA5ZYNwVdezdOxjZUnCDHO 30gQ== 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=bOqAjeh8yUUKBBc/Ip6N0QHF7dg1KpkosW6s25B4qzU=; b=cj1x33NizMz3OBBBb2V90MTEJ+o9t+csTlphEW1RHxHdolruTINBAcaYvQgBltWWZk zuroqLsP80cZPcohJjbu5J/BWpvAWim8RG1DS6tCxBct7mieQ8VMeqcF7976a1LWCHKm Y0fznArR9Jxxmz/n0dli4Yt60bH/Ekk+SxNVN8cSdl9WCZUjOp/HMr74lcq3RaA0Mrmu Eccr70Xwp7qaUMGKYVcmX4sHQg/6k+Hfgcc+ExauzO7hcCUaFz+JhrXKAFHuV/lMUQ8A m1Sln+vOp6w0aUKvXXdAA+OjoIbZpFGlUWn+bTT+1a/BLlveqJZDpjB/YXUkLO3Q2ivR EE9g== X-Gm-Message-State: AFeK/H1YBdvhiTP1+WHF7Cxf4Wi7FdOUxLSQDtlUXSOLF/DTpioruxkvjQZBNxQ0mDkI44RTFgT/z5LAdUu2PA== X-Received: by 10.159.33.34 with SMTP id 31mr2436554uab.23.1490864136145; Thu, 30 Mar 2017 01:55:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.82.103 with HTTP; Thu, 30 Mar 2017 01:55:35 -0700 (PDT) In-Reply-To: References: From: Alexey Goncharuk Date: Thu, 30 Mar 2017 11:55:35 +0300 Message-ID: Subject: Re: putting entity into cache while commiting.Why!? To: dev@ignite.apache.org Content-Type: multipart/alternative; boundary=94eb2c0b61743e4fd3054beedbca archived-at: Thu, 30 Mar 2017 08:55:41 -0000 --94eb2c0b61743e4fd3054beedbca Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Can you please paste the full example? 2017-03-30 11:50 GMT+03:00 ALEKSEY KUZNETSOV : > But i managed to read dirty. That is my example : > > Ignite ignite0 =3D ignite(0); > IgniteTransactions transactions =3D ignite0.transactions(); > IgniteCache cache =3D ignite0.getOrCreateCache("testCache= "); > Object monitor =3D new Object(); > > GridTestUtils.runAsync(new Callable() { > @Override > public Object call() throws Exception { > synchronized (monitor){ > doInTransaction(ignite(1), new Callable() { > @Override > public Object call() throws Exception { > cache.put("key1", "val1"); > monitor.wait(); > return null; > } > }); > } > return null; > } > }); > > Transaction tx =3D > transactions.txStart(TransactionConcurrency.OPTIMISTIC, > TransactionIsolation.READ_COMMITTED); > cache.put("key1", "val1"); > > And through debugging cache.put() method i can see in method > *org.apache.ignite.internal.processors.cache.distributed. > near.GridNearTxLocal#enlistWriteEntry* > that "key1" already *EXISTS *in internal cache : cacheCtx.cache().entryEx= () > returns not null. > > =D1=81=D1=80, 29 =D0=BC=D0=B0=D1=80. 2017 =D0=B3. =D0=B2 20:11, Alexander= Fedotov < > alexander.fedotoff@gmail.com > >: > > Hello Aleksey, > > No, the enlisted entry won't be visible for other transactions. Dirty rea= ds > are not allowed in Ignite. > > Kind regards, > Alex > > 29 =D0=BC=D0=B0=D1=80=D1=82=D0=B0 2017 =D0=B3. 7:36 PM =D0=BF=D0=BE=D0=BB= =D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C "ALEKSEY KUZNETSOV" = < > alkuznetsov.sb@gmail.com> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > > Hello, Igniters! I have one more question to you. Will appreciate any hel= p. > Consider cache with near , dht configured not null. > When we start commit transaction , in method > *org.apache.ignite.internal.processors.cache.distributed. > near.GridNearTxLocal#enlistWriteEntry* > we put newly created entry into cache by executing entryEx(). > I wonder if this entry will became visible for other transactions!? > -- > > *Best Regards,* > > *Kuznetsov Aleksey* > > -- > > *Best Regards,* > > *Kuznetsov Aleksey* > --94eb2c0b61743e4fd3054beedbca--