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 A92B82009E2 for ; Wed, 1 Jun 2016 19:56:36 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A7F01160A4C; Wed, 1 Jun 2016 17:56:36 +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 C8692160A45 for ; Wed, 1 Jun 2016 19:56:35 +0200 (CEST) Received: (qmail 96866 invoked by uid 500); 1 Jun 2016 17:56:34 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 96850 invoked by uid 99); 1 Jun 2016 17:56:33 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jun 2016 17:56:33 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 7DD4E1A0579 for ; Wed, 1 Jun 2016 17:56:33 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id giz9cWl8MgwL for ; Wed, 1 Jun 2016 17:56:31 +0000 (UTC) Received: from mail-it0-f42.google.com (mail-it0-f42.google.com [209.85.214.42]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 9B2395F4E6 for ; Wed, 1 Jun 2016 17:56:30 +0000 (UTC) Received: by mail-it0-f42.google.com with SMTP id e62so97967579ita.1 for ; Wed, 01 Jun 2016 10:56:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=kTWyOsrfDfYebVdMk0SAMKKDGcw69Bbow4kldsb6Ew0=; b=tymAki1CZAxLqMlEi93ny3TZ1H8nlHZa5MqNG4KphxgRHdSJU5pD4IeHhkkVj2lgu1 QnPgJTaITpgPwtwoQ416WDWssrLsyCpurjld1iNyRro27wy11Z03C0DGelBp2umjtTRt SNvQ6pTOGfYXMRUuCqXMxXFyLBX3zdPZqQhTzfOendZsgjH/9Y46AZcIQIK31qEl25lS ia1tNmgp8cPsROU5EYEYiPKPpfpuVlFxHZZhu0bxVlqNjlkGq4gWcgvBkuMofHDer1Po hAIuJ4pNzimjD0CeXvjqggUf620PJLEoD4LWDcQN7fnNDCwAQe9mlJ42/HMNjM6845Zz kQZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=kTWyOsrfDfYebVdMk0SAMKKDGcw69Bbow4kldsb6Ew0=; b=LhXlCse4rwmYjWy5qqwETZfKR6lTaWMguK4JUwOz/GFTsiW25miokrOQUESowgSZO7 4NHkAhk5bIzNR0oqpIPMyfrr2W9tF4aHzSYF6t7nXtYLF2lPe/85DfanpritIKqvmOzL M+M30p+U1qxlovNOiPpqQ55R9Eh+BqbvxpnmCbXNCu/SzvVp7+mgeYIaD1KZlm5cHvvk VB82Lwbe49IpiDHIX7yPEIh6TXlXrUdsgMS0becGtSOO6rAMFcJnxlw+/15HVsq0soXu NOQNYUd9WUQb9K6wdSNud1buvlyFTmHVd90tJNqakgjS4+KL0CRbLHGBh0syjAcNNbh4 8jYw== X-Gm-Message-State: ALyK8tLHVNsxAvkBQ2juKDSPqS3t/CQ/eDB8eGAaAyQbIRAjoHU2N6F4zH/wec+RHX73HcjcDFgfh6/+PL9HDA== MIME-Version: 1.0 X-Received: by 10.36.54.200 with SMTP id l191mr6889901itl.79.1464803789514; Wed, 01 Jun 2016 10:56:29 -0700 (PDT) Received: by 10.107.133.211 with HTTP; Wed, 1 Jun 2016 10:56:29 -0700 (PDT) In-Reply-To: References: Date: Wed, 1 Jun 2016 10:56:29 -0700 Message-ID: Subject: Re: Major compaction cannot remove deleted rows until the region is split. Strange! From: Tianying Chang To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=001a11434bfc8a30f705343b35ac archived-at: Wed, 01 Jun 2016 17:56:36 -0000 --001a11434bfc8a30f705343b35ac Content-Type: text/plain; charset=UTF-8 Hi, Stack After moving the region and issue a major compact on that region, its size shrink from 99G down to 24G. So it looks like the region is in a bad state that cannot recover, close/open it fixed the issue. And from the region size metric graph, we can see major compaction stop working since March 31, so some bug that caused region enter into bad state... Unfortunately, we don't have DEBUG enabled and that is the last region that has the issue, it is hard to figure out what is the bug that caused the bad state... Thanks Tian-Ying On Tue, May 31, 2016 at 3:43 PM, Tianying Chang wrote: > Hi, Stack > > Based on the log, the major compaction was run, and it took 5+ hours. And > I also manually run major_compact from hbase shell explicitly to verify. > > I just moved the region to a different RS and issued a major_compact on > that region again, let me see if the major compaction can succeed and will > report back. > > Thanks > Tian-Ying > > On Sun, May 29, 2016 at 4:35 PM, Stack wrote: > >> On Fri, May 27, 2016 at 3:17 PM, Tianying Chang >> wrote: >> >> > Yes, it is 94.26. By a quick glance, I didn't see any put that is >> older >> > than the delete marker's TS, which could go as far as about couple weeks >> > ago since major compaction on it for long time seems. >> > >> Also it is really strange that if the region is split, then seems >> > everything is working as expected. Also we noticed, the same region >> > replicated at the slave side is totally normal, i.e. at 20+G.... >> > >> > >> If you move the region to another server, does that work? >> >> Looking in 0.94 codebase, I see this in Compactor#compact >> >> >> // For major compactions calculate the earliest put timestamp >> >> // of all involved storefiles. This is used to remove >> >> // family delete marker during the compaction. >> >> if (majorCompaction) { >> >> tmp = fileInfo.get(StoreFile.EARLIEST_PUT_TS); >> >> if (tmp == null) { >> >> // There's a file with no information, must be an old one >> >> // assume we have very old puts >> >> earliestPutTs = HConstants.OLDEST_TIMESTAMP; >> >> } else { >> >> earliestPutTs = Math.min(earliestPutTs, Bytes.toLong(tmp)); >> >> } >> >> } >> >> >> The above is followed by this log line: >> >> >> if (LOG.isDebugEnabled()) { >> >> LOG.debug("Compacting " + file + >> >> ", keycount=" + keyCount + >> >> ", bloomtype=" + r.getBloomFilterType().toString() + >> >> ", size=" + StringUtils.humanReadableInt(r.length()) + >> >> ", encoding=" + r.getHFileReader().getEncodingOnDisk() + >> >> (majorCompaction? ", earliestPutTs=" + earliestPutTs: "")); >> >> } >> >> This prints out earliestPutTs. You see that in the logs? You running with >> DEBUG? Does the earliest put ts preclude our dropping delete family? >> >> >> Looking more in code, we retain deletes in following circumstances: >> >> >> this.retainDeletesInOutput = scanType == ScanType.MINOR_COMPACT || >> scan >> .isRaw(); >> >> >> So, for sure we are running major compaction? >> >> Otherwise, have to dig in a bit more here.. This stuff is a little >> involved. >> St.Ack >> >> >> >> >> > On Fri, May 27, 2016 at 3:13 PM, Stack wrote: >> > >> > > On Fri, May 27, 2016 at 2:32 PM, Tianying Chang >> > wrote: >> > > >> > > > Hi, >> > > > >> > > > We saw a very strange case in one of our production cluster. A >> couple >> > > > regions cannot get their deleted rows or delete marker removed even >> > after >> > > > major compaction. However when the region triggered split (we set >> 100G >> > > for >> > > > auto split), the deletion worked. The 100G region becomes two 10G >> > > daughter >> > > > regions, and all the delete marker are gone. >> > > > >> > > > Also, the same region in the slave cluster (through replication) >> have >> > > > normal size at about 20+G. >> > > > >> > > > BTW, the delete marker in the regions are mostly deleteFamily if it >> > > > matters. >> > > > >> > > > This is really weird. Anyone has any clue for this strange behavior? >> > > > >> > > > Thanks >> > > > Tian-Ying >> > > > >> > > > These 0.94 Tian-Ying? >> > > >> > > It looks like the DeleteFamily is retained only; do you see incidence >> > where >> > > there may have been versions older than the DeleteFamily that are also >> > > retained post-major-compaction? >> > > >> > > St.Ack >> > > >> > > >> > > >> > > > A snippet of the HFile generated by the major compaction: >> > > > >> > > > : \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459808114380/DeleteFamily/vlen=0/ts=2292870047 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459808114011/DeleteFamily/vlen=0/ts=2292869794 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459805381104/DeleteFamily/vlen=0/ts=2291072240 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459805380673/DeleteFamily/vlen=0/ts=2291071997 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459802643449/DeleteFamily/vlen=0/ts=2290248886 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459802643246/DeleteFamily/vlen=0/ts=2290248786 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459799913003/DeleteFamily/vlen=0/ts=2289446916 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459797181831/DeleteFamily/vlen=0/ts=2288670451 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459794447388/DeleteFamily/vlen=0/ts=2287911443 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459791708803/DeleteFamily/vlen=0/ts=2287213792 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459788978387/DeleteFamily/vlen=0/ts=2286488738 >> > > > V: >> > > > K: \xA0\x00\x00L\x1A@\x1CBe\x00\x00\x08m\x03\x1A@ >> > > > \x10\x00?PF/d:/1459786243642/DeleteFamily/vlen=0/ts=2285778927 >> > > > V: >> > > > >> > > >> > >> > > --001a11434bfc8a30f705343b35ac--