From notifications-return-4198-apmail-ignite-notifications-archive=ignite.apache.org@ignite.apache.org Wed Jul 10 12:32:13 2019 Return-Path: X-Original-To: apmail-ignite-notifications-archive@minotaur.apache.org Delivered-To: apmail-ignite-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 0742C196A1 for ; Wed, 10 Jul 2019 12:32:12 +0000 (UTC) Received: (qmail 59559 invoked by uid 500); 10 Jul 2019 12:32:12 -0000 Delivered-To: apmail-ignite-notifications-archive@ignite.apache.org Received: (qmail 59525 invoked by uid 500); 10 Jul 2019 12:32:12 -0000 Mailing-List: contact notifications-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 notifications@ignite.apache.org Received: (qmail 59478 invoked by uid 99); 10 Jul 2019 12:32:12 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2019 12:32:12 +0000 From: GitBox To: notifications@ignite.apache.org Subject: [GitHub] [ignite] sk0x50 commented on a change in pull request #5656: IGNITE-10663 Read Repair Message-ID: <156276193212.29123.12712100346562310694.gitbox@gitbox.apache.org> Date: Wed, 10 Jul 2019 12:32:12 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit sk0x50 commented on a change in pull request #5656: IGNITE-10663 Read Repair URL: https://github.com/apache/ignite/pull/5656#discussion_r302034854 ########## File path: modules/core/src/main/java/org/apache/ignite/IgniteCache.java ########## @@ -136,6 +136,41 @@ */ public IgniteCache withPartitionRecover(); + /** + * Gets an instance of {@code IgniteCache} that will perform backup nodes check on each get attempt. + *

+ * Read Repair means that each backup node will be checked to have the same entry as primary node has, + * and in case consistency violation found: + *

    + *
  • for transactional caches: + *

    values across the topology will be replaced by latest versioned value: + *

      + *
    • automaticaly for OPTIMISTIC || READ_COMMITTED transactions
    • + *
    • at commit() for PESSIMISTIC && !READ_COMMITTED transactions
    • + *
    + *

    consistency violation event will be recorded in case it's configured as recordable

  • + *
  • for atomic caches: consistency violation exception will be thrown.
  • + *
+ *

+ * One more important thing is that this proxy usage does not guarantee "all copies check" in case value + * already cached inside the transaction. In case you use !READ_COMMITTED isolation mode and already have + * cached value, for example already read the value or performed a write, you'll gain the cached value. + *

+ * Local caches and caches without backups, obviously, can not be checked using this feature. + *

+ * Full list of repairable methods: + *

    + *
  • {@link IgniteCache#containsKey} && {@link IgniteCache#containsKeyAsync}
  • + *
  • {@link IgniteCache#containsKeys} && {@link IgniteCache#containsKeysAsync}
  • + *
  • {@link IgniteCache#getEntry} && {@link IgniteCache#getEntryAsync}
  • + *
  • {@link IgniteCache#getEntries} && {@link IgniteCache#getEntriesAsync}
  • + *
  • {@link IgniteCache#get} && {@link IgniteCache#getAsync}
  • + *
  • {@link IgniteCache#getAll} && {@link IgniteCache#getAllAsync}
  • + *
+ * @return Cache with explicit consistency check on each read and repair if necessary. Review comment: Perhaps, we need to clearly clarify the limitations. I mean use cases when the ReadReapir feature does not work (unrecoverable cases): data streamer constraints and etc. What do you think? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services