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 5E0E9200C37 for ; Sun, 19 Mar 2017 20:32:38 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5C87B160B7D; Sun, 19 Mar 2017 19:32:38 +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 7ED78160B6D for ; Sun, 19 Mar 2017 20:32:37 +0100 (CET) Received: (qmail 77039 invoked by uid 500); 19 Mar 2017 19:32:36 -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 77027 invoked by uid 99); 19 Mar 2017 19:32:36 -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; Sun, 19 Mar 2017 19:32:36 +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 ED881183A61 for ; Sun, 19 Mar 2017 19:32:35 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 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, 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-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id sEJBKEAJYeAZ for ; Sun, 19 Mar 2017 19:32:34 +0000 (UTC) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 439B45F341 for ; Sun, 19 Mar 2017 19:32:34 +0000 (UTC) Received: by mail-lf0-f46.google.com with SMTP id a6so48524227lfa.0 for ; Sun, 19 Mar 2017 12:32:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:message-id:date:to; bh=f+I/vpA6VsjGfNMWGaqMdW3uTLEOXdkzmQX2Cr7koDI=; b=ewHGAP///SCRilGAFzlylWTTa5+PknahdYPl9FFioAOBruhPP3lKJAxQ09W1Tabff3 ZP6CNVlyR5NjoTLv5XNm+zH08mQCLY4NB94xqlb0YdQUIwOJ9PFI1k/PoDokuGc3mJaV pgtPR48T9NvBKMy8y/x7MWm5d6QtayikcGUdVm30r31NgQjsdcyYAb8g6jdDDKkG4GHc vlnhyNXsuqq0ebvOYermFGArmjMzRRcFjEc5YNiLMpXKcYs3WhbXPrB6+SzKlSt8jOV4 WMVZEpGYjsKY864oJu4fkfITxIccNT/VBA6ZmRFjV/f8Y9WTtP6DdPlQjWK35QTsw4sb U1zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:message-id:date:to; bh=f+I/vpA6VsjGfNMWGaqMdW3uTLEOXdkzmQX2Cr7koDI=; b=ER64uElrRo6URRZR6RZ5xXaF9Po+wG/D4f/r0ZjieSAj5PPcGgU9tINNEIkutVqD5+ 7VeFkNW85XHKlUz9uCC3uchhwGHCeaFm15+Pusk/IBuB1jUPi5Zn3mronIJlYokpikTB PK305+73C2Jp0vXoqjszj9+JpAPcnSJYpWj6J1yFTkWcaJXZaP3rwVsIqq1QJ8dvc6DL uwNunQ3R1swwVtMCwGbKni7A435ywRIo5eIWUpI+/RlW5G4grV3Sr5/aMyHex/EUULa8 d6RxUZwYc8MbFQvs0WkikI7M+SbA56jNR+l7/60oQrJwaBn+dqdBJfe9MrtluIGvsBlE 9fNQ== X-Gm-Message-State: AFeK/H1b0pu3F/H96rjTDoCY/gCZ2G5iV7jUqKprZUDCK+fHrnWGz/1/rQ3kD9PRt6Z67w== X-Received: by 10.46.7.18 with SMTP id 18mr8035519ljh.5.1489951953523; Sun, 19 Mar 2017 12:32:33 -0700 (PDT) Received: from [10.0.1.4] (broadband-178-140-235-81.moscow.rt.ru. [178.140.235.81]) by smtp.gmail.com with ESMTPSA id 26sm1837335ljg.37.2017.03.19.12.32.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Mar 2017 12:32:32 -0700 (PDT) From: Alisher Alimov Content-Type: multipart/signed; boundary="Apple-Mail=_A2E72AC8-7351-4A5C-A9C8-3D091BE9916F"; protocol="application/pgp-signature"; micalg=pgp-sha256 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) Subject: CacheStore and Transaction Message-Id: Date: Sun, 19 Mar 2017 22:32:31 +0300 To: dev@ignite.apache.org X-Mailer: Apple Mail (2.3259) archived-at: Sun, 19 Mar 2017 19:32:38 -0000 --Apple-Mail=_A2E72AC8-7351-4A5C-A9C8-3D091BE9916F Content-Type: multipart/alternative; boundary="Apple-Mail=_F5FA2E4A-99F4-4F0B-9F6A-33FCF74D63F1" --Apple-Mail=_F5FA2E4A-99F4-4F0B-9F6A-33FCF74D63F1 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello! I found bug when using CacheStore with Transaction or it=E2=80=99s = expected behaviour? Example: CacheConfiguration cacheConfiguration =3D new = CacheConfiguration("test.no-op"); cacheConfiguration.setWriteThrough(true); cacheConfiguration.setCacheWriterFactory(noOpCacheWriterFactory); cacheConfiguration.setWriteBehindBatchSize(1); try (Transaction transaction =3D ignite.transactions().txStart()) { cache.put(1, 1); // will be flushed here cache.put(2, 2); transaction.rollback(); } Does not matter if transaction was not completed or rollback, dirty = records are flushed through CacheWriter and persistent storage will = contains inconsistent data. Expected behaviour: only committed data must be flushed With best regards Alisher Alimov alimovalisher@gmail.com --Apple-Mail=_F5FA2E4A-99F4-4F0B-9F6A-33FCF74D63F1 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hello!

I = found bug when using CacheStore with Transaction or it=E2=80=99s = expected behaviour?

Example: 

CacheConfiguration cacheConfiguration =3D new CacheConfiguration("test.no-op");
cacheConfiguration.setWriteThrough(true);
cacheConfiguration.setCacheWriterFactory(noOpCacheWriterFactory);
cacheConfiguration.setWriteBehindBatchSize(1);

try =
(Transaction transaction =3D ignite.transactions().txStart()) {
= cache.put(1, 1); // will be flushed = here
= cache.put(2, 2);

= transaction.rollback();
}

Does not matter = if transaction was not completed or rollback, dirty records are flushed = through CacheWriter and persistent storage will contains inconsistent = data.

Expected behaviour: only committed data must be = flushed


With best regards
Alisher = Alimov




= --Apple-Mail=_F5FA2E4A-99F4-4F0B-9F6A-33FCF74D63F1-- --Apple-Mail=_A2E72AC8-7351-4A5C-A9C8-3D091BE9916F Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJYztzPAAoJEAJwPlFY4Tr9/d0H/3V1UGoaTbiPuAi/P65aqutM XOpHnuw2OMu6HoX6WIAUsClA060R2NPGTzfJw6ufaGK1cqAWuVKQGLXsIjGyThBw BoDTld1Mnw8qHTe3u/UD6MlfeP0ItrXt2Zteqid0XpyLQ5mcUq+ZHjLvWIvXjpKx fL/RTG9orE8gnAwLpeiEtNBrhT14e4dmF64YjA5vgxSE/awXG8HqAlWzx9NVe05C HE/zQYdNbo8ZwtHkm0j4mDhKAdYyy0X4d3Lf+N0Qvk9uEDYAPRLSJZ+sQBn3SFCw FpJNgzqEUlCeeJYh8a+amNgqiPBUR3ekPY6B5a4iym6YpCZmgaVXGFBKpGVVc30= =WJmX -----END PGP SIGNATURE----- --Apple-Mail=_A2E72AC8-7351-4A5C-A9C8-3D091BE9916F--