Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0488ED536 for ; Fri, 26 Oct 2012 00:27:13 +0000 (UTC) Received: (qmail 15607 invoked by uid 500); 26 Oct 2012 00:27:12 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 15566 invoked by uid 500); 26 Oct 2012 00:27:12 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 15557 invoked by uid 99); 26 Oct 2012 00:27:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2012 00:27:12 +0000 Date: Fri, 26 Oct 2012 00:27:12 +0000 (UTC) From: "Gregory Chanan (JIRA)" To: issues@hbase.apache.org Message-ID: <2126613586.30121.1351211232793.JavaMail.jiratomcat@arcas> In-Reply-To: <1508180974.25792.1351135692105.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (HBASE-7051) Read/Updates (increment,checkAndPut) should properly read MVCC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-7051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13484602#comment-13484602 ] Gregory Chanan commented on HBASE-7051: --------------------------------------- Sorry last sentence should be: "Then A goes, reads 10 and puts 11" > Read/Updates (increment,checkAndPut) should properly read MVCC > -------------------------------------------------------------- > > Key: HBASE-7051 > URL: https://issues.apache.org/jira/browse/HBASE-7051 > Project: HBase > Issue Type: Bug > Affects Versions: 0.96.0 > Reporter: Gregory Chanan > > See, for example: > {code} > // TODO: Use MVCC to make this set of increments atomic to reads > {code} > Here's an example of what I can happen (would probably be good to write up a test case for each read/update): > Concurrent update via increment and put. > The put grabs the row lock first and updates the memstore, but releases the row lock before the MVCC is advanced. Then, the increment grabs the row lock and reads right away, reading the old value and incrementing based on that. > There are a few options here: > 1) Waiting for the MVCC to advance for read/updates: the downside is that you have to wait for updates on other rows. > 2) Have an MVCC per-row (table configuration): this avoids the unnecessary contention of 1) > 3) Transform the read/updates to write-only with rollup on read.. E.g. an increment would just have the number of values to increment. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira