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 45AB9200D3A for ; Wed, 15 Nov 2017 22:30:05 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 43F77160BF4; Wed, 15 Nov 2017 21:30:05 +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 8B7FB160BE4 for ; Wed, 15 Nov 2017 22:30:04 +0100 (CET) Received: (qmail 57767 invoked by uid 500); 15 Nov 2017 21:30:03 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 57756 invoked by uid 99); 15 Nov 2017 21:30:03 -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; Wed, 15 Nov 2017 21:30:03 +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 A826B180785 for ; Wed, 15 Nov 2017 21:30:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled 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 dGEqj1l4k9f6 for ; Wed, 15 Nov 2017 21:30:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 422635FD1B for ; Wed, 15 Nov 2017 21:30:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C7A99E0E34 for ; Wed, 15 Nov 2017 21:30:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 7EC45240CE for ; Wed, 15 Nov 2017 21:30:00 +0000 (UTC) Date: Wed, 15 Nov 2017 21:30:00 +0000 (UTC) From: "Hudson (JIRA)" To: dev@zookeeper.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ZOOKEEPER-2574) PurgeTxnLog can inadvertently delete required txn log files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 15 Nov 2017 21:30:05 -0000 [ https://issues.apache.org/jira/browse/ZOOKEEPER-2574?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16254228#comment-16254228 ] Hudson commented on ZOOKEEPER-2574: ----------------------------------- FAILURE: Integrated in Jenkins build ZooKeeper-trunk #3609 (See [https://builds.apache.org/job/ZooKeeper-trunk/3609/]) ZOOKEEPER-2690: Update documentation source for ZOOKEEPER-2574 (phunt: rev efeebd0a1ba7f6be3b4ffe262ab4045656bb1eb3) * (edit) docs/index.pdf * (edit) docs/zookeeperOver.pdf * (edit) docs/zookeeperStarted.pdf * (edit) docs/linkmap.pdf * (edit) docs/zookeeperJMX.pdf * (edit) docs/zookeeperHierarchicalQuorums.pdf * (edit) src/docs/src/documentation/content/xdocs/zookeeperAdmin.xml * (edit) docs/javaExample.pdf * (edit) docs/zookeeperProgrammers.pdf * (edit) docs/zookeeperTutorial.pdf * (edit) docs/zookeeperObservers.pdf * (edit) docs/zookeeperAdmin.html * (edit) docs/zookeeperReconfig.pdf * (edit) docs/zookeeperInternals.pdf * (edit) docs/zookeeperQuotas.pdf * (edit) docs/recipes.pdf * (edit) docs/zookeeperAdmin.pdf > PurgeTxnLog can inadvertently delete required txn log files > ----------------------------------------------------------- > > Key: ZOOKEEPER-2574 > URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2574 > Project: ZooKeeper > Issue Type: Bug > Components: server > Affects Versions: 3.4.7, 3.4.8, 3.5.0, 3.5.1, 3.5.2 > Environment: Zookeeper 3.4.8, standalone, and 3-server quorum > Reporter: Abhishek Rai > Assignee: Abhishek Rai > Fix For: 3.4.10, 3.5.3, 3.6.0 > > Attachments: ZOOKEEPER-2574.2.patch, ZOOKEEPER-2574.3.patch, ZOOKEEPER-2574.4.patch, ZOOKEEPER-2574.5.patch, ZOOKEEPER-2574.6.patch, ZOOKEEPER-2574.patch > > > As part of the fix for ZOOKEEPER-1797, the call to FileTxnSnapLog.getSnapshotLogs() was removed from PurgeTxnLog.java. As a result, some old-looking but required txn log files can be deleted, resulting in data corruption or loss. > For example, consider the following: > 1. Configuration: > autopurge.snapRetainCount=3 > 2. Following files exist: > log.100 spans transactions from zxid=100 till zxid=140 (inclusive) > snapshot.110 - snapshot as of zxid=110 > snapshot.120 - snapshot as of zxid=120 > snapshot.130 - snapshot as of zxid=130 > Above scenario is possible when snapshotting has happened multiple times but without accompanying log rollover, which is possible if the server was running as a learner. > 3. PurgeTxnLog retains all snapshots but deletes log.100 because its zxid is older than the zxid of the oldest snapshot (110). This results in loss of transactions in the range 131-140. > Before the fix for ZOOKEEPER-1797, this was avoided by the call to FileTxnSnapLog.getSnapshotLogs() which finds and retains the newest txn log file with starting zxid < oldest retained snapshot's highest zxid. -- This message was sent by Atlassian JIRA (v6.4.14#64029)