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 B9898200D49 for ; Fri, 24 Nov 2017 17:49:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id B80C2160BDA; Fri, 24 Nov 2017 16:49:06 +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 DBC8E160BF2 for ; Fri, 24 Nov 2017 17:49:05 +0100 (CET) Received: (qmail 33689 invoked by uid 500); 24 Nov 2017 16:49:05 -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 33677 invoked by uid 99); 24 Nov 2017 16:49:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Nov 2017 16:49:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 3152FC4D37 for ; Fri, 24 Nov 2017 16:49:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -98.761 X-Spam-Level: X-Spam-Status: No, score=-98.761 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, KAM_LOTSOFHASH=0.25, KB_WAM_FROM_NAME_SINGLEWORD=0.2, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fcmTpdykavYn for ; Fri, 24 Nov 2017 16:49:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 3BAB25FC34 for ; Fri, 24 Nov 2017 16:49:02 +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 6C968E0E0B for ; Fri, 24 Nov 2017 16:49:01 +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 6EDA0241B4 for ; Fri, 24 Nov 2017 16:49:00 +0000 (UTC) Date: Fri, 24 Nov 2017 16:49:00 +0000 (UTC) From: "Pankaj Kumar (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HBASE-19343) Restore snapshot makes parent split region online MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 24 Nov 2017 16:49:06 -0000 [ https://issues.apache.org/jira/browse/HBASE-19343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pankaj Kumar updated HBASE-19343: --------------------------------- Fix Version/s: 1.5.0 Status: Patch Available (was: Open) > Restore snapshot makes parent split region online > -------------------------------------------------- > > Key: HBASE-19343 > URL: https://issues.apache.org/jira/browse/HBASE-19343 > Project: HBase > Issue Type: Bug > Components: snapshots > Reporter: Pankaj Kumar > Assignee: Pankaj Kumar > Fix For: 1.5.0 > > Attachments: HBASE-19343-branch-1.patch, Snapshot.jpg > > > Restore snapshot makes parent split region online as shown in the attached snapshot. > Steps to reproduce > ===================== > 1. Create table > 2. Insert few records into the table > 3. flush the table > 4. Split the table > 5. Create snapshot before catalog janitor clears the parent region entry from meta. > 6. Restore snapshot > We can see the problem in meta entries, > Meta content before restore snapshot: > {noformat} > t1,,1511537529449.077a12b0b3c91b053fa95223635f9543. column=info:regioninfo, timestamp=1511537565964, value={ENCODED => 077a12b0b3c91b053fa95223635f9543, NAME => 't1,,1511537529449.077a12b0b3c91b053fa95223635f9543.', STARTKEY => > '', ENDKEY => '', OFFLINE => true, SPLIT => true} > t1,,1511537529449.077a12b0b3c91b053fa95223635f9543. column=info:seqnumDuringOpen, timestamp=1511537530107, value=\x00\x00\x00\x00\x00\x00\x00\x02 > t1,,1511537529449.077a12b0b3c91b053fa95223635f9543. column=info:server, timestamp=1511537530107, value=host-xx:16020 > t1,,1511537529449.077a12b0b3c91b053fa95223635f9543. column=info:serverstartcode, timestamp=1511537530107, value=1511537511523 > t1,,1511537529449.077a12b0b3c91b053fa95223635f9543. column=info:splitA, timestamp=1511537565964, value={ENCODED => 3c7c866d4df370c586131a4cbe0ef6a8, NAME => 't1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8.', STARTKEY => '', > ENDKEY => 'm'} > t1,,1511537529449.077a12b0b3c91b053fa95223635f9543. column=info:splitB, timestamp=1511537565964, value={ENCODED => dc7facd824c85b94e5bf6a2e6b5f5efc, NAME => 't1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc.', STARTKEY => 'm > ', ENDKEY => ''} > t1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8. column=info:regioninfo, timestamp=1511537566075, value={ENCODED => 3c7c866d4df370c586131a4cbe0ef6a8, NAME => 't1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8.', STARTKEY => > '', ENDKEY => 'm'} > t1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8. column=info:seqnumDuringOpen, timestamp=1511537566075, value=\x00\x00\x00\x00\x00\x00\x00\x02 > t1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8. column=info:server, timestamp=1511537566075, value=host-xx:16020 > t1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8. column=info:serverstartcode, timestamp=1511537566075, value=1511537511523 > t1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc. column=info:regioninfo, timestamp=1511537566069, value={ENCODED => dc7facd824c85b94e5bf6a2e6b5f5efc, NAME => 't1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc.', STARTKEY = > > 'm', ENDKEY => ''} > t1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc. column=info:seqnumDuringOpen, timestamp=1511537566069, value=\x00\x00\x00\x00\x00\x00\x00\x08 > t1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc. column=info:server, timestamp=1511537566069, value=host-xx:16020 > t1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc. column=info:serverstartcode, timestamp=1511537566069, value=1511537511523 > {noformat} > Meta content after restore snapshot: > {noformat} > t1,,1511537529449.077a12b0b3c91b053fa95223635f9543. column=info:regioninfo, timestamp=1511537667635, value={ENCODED => 077a12b0b3c91b053fa95223635f9543, NAME => 't1,,1511537529449.077a12b0b3c91b053fa95223635f9543.', STARTKEY => > '', ENDKEY => ''} > t1,,1511537529449.077a12b0b3c91b053fa95223635f9543. column=info:seqnumDuringOpen, timestamp=1511537667635, value=\x00\x00\x00\x00\x00\x00\x00\x0A > t1,,1511537529449.077a12b0b3c91b053fa95223635f9543. column=info:server, timestamp=1511537667635, value=host-xx:16020 > t1,,1511537529449.077a12b0b3c91b053fa95223635f9543. column=info:serverstartcode, timestamp=1511537667635, value=1511537511523 > t1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8. column=info:regioninfo, timestamp=1511537667598, value={ENCODED => 3c7c866d4df370c586131a4cbe0ef6a8, NAME => 't1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8.', STARTKEY => > '', ENDKEY => 'm'} > t1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8. column=info:seqnumDuringOpen, timestamp=1511537667598, value=\x00\x00\x00\x00\x00\x00\x00\x0B > t1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8. column=info:server, timestamp=1511537667598, value=host-xx:16020 > t1,,1511537565718.3c7c866d4df370c586131a4cbe0ef6a8. column=info:serverstartcode, timestamp=1511537667598, value=1511537511523 > t1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc. column=info:regioninfo, timestamp=1511537667621, value={ENCODED => dc7facd824c85b94e5bf6a2e6b5f5efc, NAME => 't1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc.', STARTKEY = > > 'm', ENDKEY => ''} > t1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc. column=info:seqnumDuringOpen, timestamp=1511537667621, value=\x00\x00\x00\x00\x00\x00\x00\x0D > t1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc. column=info:server, timestamp=1511537667621, value=host-xx:16020 > t1,m,1511537565718.dc7facd824c85b94e5bf6a2e6b5f5efc. column=info:serverstartcode, timestamp=1511537667621, value=1511537511523 > {noformat} > Root Cause: > We dont update the region split information in .regioninfo file in HDFS, but while restoring the snapshot we set regioninfo based on the .regioninfo entries, > {code} > // Identify which region are still available and which not. > // NOTE: we rely upon the region name as: "table name, start key, end key" > List tableRegions = getTableRegions(); > if (tableRegions != null) { > monitor.rethrowException(); > for (HRegionInfo regionInfo: tableRegions) { > String regionName = regionInfo.getEncodedName(); > if (regionNames.contains(regionName)) { > LOG.info("region to restore: " + regionName); > regionNames.remove(regionName); > metaChanges.addRegionToRestore(regionInfo); > } else { > LOG.info("region to remove: " + regionName); > metaChanges.addRegionToRemove(regionInfo); > } > } > {code} > Here getTableRegions() is retrieved from HDFS. > There can be two solutions, > 1. Set the regioninfo based on the snapshot-manifest details. > 2. Update the .regioninfo after region split -- This message was sent by Atlassian JIRA (v6.4.14#64029)