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 4CB5C200BCE for ; Fri, 2 Dec 2016 10:15:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 4B638160B24; Fri, 2 Dec 2016 09:15:00 +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 91F19160B16 for ; Fri, 2 Dec 2016 10:14:59 +0100 (CET) Received: (qmail 58204 invoked by uid 500); 2 Dec 2016 09:14:58 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 58192 invoked by uid 99); 2 Dec 2016 09:14:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2016 09:14:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 7FB772C1F5A for ; Fri, 2 Dec 2016 09:14:58 +0000 (UTC) Date: Fri, 2 Dec 2016 09:14:58 +0000 (UTC) From: "Branimir Lambov (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-12956) CL is not replayed on custom 2i exception MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 02 Dec 2016 09:15:00 -0000 [ https://issues.apache.org/jira/browse/CASSANDRA-12956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15714555#comment-15714555 ] Branimir Lambov commented on CASSANDRA-12956: --------------------------------------------- Thanks, much cleaner and safer indeed. One small issue and a nit: - The [2i flush|https://github.com/apache/cassandra/compare/trunk...ifesdjeen:12956-3.X#diff-98f5acb96aa6d684781936c141132e2aR1082] should only be done if {{truncate}} is false. - The [barrier await|https://github.com/apache/cassandra/compare/trunk...ifesdjeen:12956-3.X#diff-98f5acb96aa6d684781936c141132e2aR1130] is not necessary as the flush does not commence [until that has happened|https://github.com/apache/cassandra/compare/trunk...ifesdjeen:12956-3.X#diff-98f5acb96aa6d684781936c141132e2aR1071]. > CL is not replayed on custom 2i exception > ----------------------------------------- > > Key: CASSANDRA-12956 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12956 > Project: Cassandra > Issue Type: Bug > Reporter: Alex Petrov > Assignee: Alex Petrov > Priority: Critical > > If during the node shutdown / drain the custom (non-cf) 2i throws an exception, CommitLog will get correctly preserved (segments won't get discarded because segment tracking is correct). > However, when it gets replayed on node startup, we're making a decision whether or not to replay the commit log. CL segment starts getting replayed, since there are non-discarded segments and during this process we're checking whether there every [individual mutation|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L215] in commit log is already committed or no. Information about the sstables is taken from [live sstables on disk|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L250-L256]. -- This message was sent by Atlassian JIRA (v6.3.4#6332)