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 8EF62200D0D for ; Fri, 25 Aug 2017 23:47:27 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 8B8EA16D5B4; Fri, 25 Aug 2017 21:47:27 +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 830ED16D5B2 for ; Fri, 25 Aug 2017 23:47:26 +0200 (CEST) Received: (qmail 41546 invoked by uid 500); 25 Aug 2017 21:47:23 -0000 Mailing-List: contact dev-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list dev@hbase.apache.org Received: (qmail 41534 invoked by uid 99); 25 Aug 2017 21:47:23 -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; Fri, 25 Aug 2017 21:47:23 +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 03E50181129 for ; Fri, 25 Aug 2017 21:47:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.63 X-Spam-Level: ** X-Spam-Status: No, score=2.63 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, WEIRD_PORT=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera.com 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 GgKxB5PQjpvk for ; Fri, 25 Aug 2017 21:47:19 +0000 (UTC) Received: from mail-vk0-f41.google.com (mail-vk0-f41.google.com [209.85.213.41]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id B7D3D5FB9F for ; Fri, 25 Aug 2017 21:47:18 +0000 (UTC) Received: by mail-vk0-f41.google.com with SMTP id z187so3192421vkd.2 for ; Fri, 25 Aug 2017 14:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=7SaksZHxhr+bthwyhVh07nUJ5/YEi6V+Qw/Pygf6ae8=; b=cODiFCD/sra/ShKn3PmATvoTb7LollGqU8zB9fk8C+BiVyWz5SbP03IrjukVGyRa94 pko07wWlraQQXtlYrPFeaxAvBGgtYaKet4HEL8AcCoZZfXFGRx4HapJzrzZpWT0UW4iz 1DAgJhDJM/NLWVBuuzachPPScBs8A6BS4R2uOJtXM+rgne/5Ez15VUsp7sV1u1QwNTbv aL3NPDddod8Ge5RRBIUJ2HY7Bm56JhKy8FaeUEFVyxkriGilWZY/LlfQHnZ7qOaS7Hgo pLBnFYVjYA5HInsc4125kO2eASfzE04q6TH1hYFsvsWPAyZ6AfiGEI+hkmzBEXX4foiv lZqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=7SaksZHxhr+bthwyhVh07nUJ5/YEi6V+Qw/Pygf6ae8=; b=Rb9mjsuMeIfDFruH9NsdiH15fH2ORWCAP1wAzzMyLOIcz/fCYqiZ4f85uobYiqEbv3 IHBi2N6fhDNO2UvXe+33thiSWL3o4ywtNxN2AZPXY+38fWYKrJ4/hd1G+8AwozL2mueS VA+ArX1SkbyFtxMpw4OTdhhtmpIt35QSvyWNlQXyx/H9w6m+BUxzT45Dyx5fIstC0+YG ZFlb2DnhGJx7LriRA4PN9Tu62rnD903PVatVJwOONi1IfNcjTx+dj78+gpH4ISZq36Z/ 3BnBbh6i2Igm0iE6E1fc38qfkVvMuTvlIsCyeNZwJpM+WcmdWhecpCQjjJqFmELj6W2Y ZX9w== X-Gm-Message-State: AHYfb5gTm1tGbRNnPI5bj36hDQAdfxUN6+UG0PcnrBsWLQeco1RWp2Ap xhOH1vV5HQ6gjykkeSlxntH9NG0hIUD2ZkI= X-Received: by 10.31.16.145 with SMTP id 17mr15618vkq.36.1503697632094; Fri, 25 Aug 2017 14:47:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.77.130 with HTTP; Fri, 25 Aug 2017 14:46:41 -0700 (PDT) In-Reply-To: References: From: Apekshit Sharma Date: Fri, 25 Aug 2017 14:46:41 -0700 Message-ID: Subject: Re: [DISCUSS] Merging Hybrid Logical Clocks with Master To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary="001a11435efc36121805579ae3cf" archived-at: Fri, 25 Aug 2017 21:47:27 -0000 --001a11435efc36121805579ae3cf Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable bq. ...but if we are recommending HLC for user tables, we have to also do end-to-end testing to demonstrate that perf is not affected by HLC. Agree. I think the only way of doing it right now is running ycsb with/without HLC. If it highlights an issue, it means there is one (there can't be false -ves). But if it doesn't, it doesn't mean there isn't one (there can be false +ve). But i think it's a reasonable way of testing. Any other ideas? On Fri, Aug 25, 2017 at 2:36 PM, Enis S=C3=B6ztutar wr= ote: > HLC will never be able to match the throughput for the system clock of > course. I was expecting the perf to be in the 2-3x slower range, not more > than an order of magnitude difference. The current perf is definitely > acceptable for meta updates, but if we are recommending HLC for user > tables, we have to also do end-to-end testing to demonstrate that perf is > not affected by HLC. > > Enis > > On Fri, Aug 25, 2017 at 2:00 PM, Apekshit Sharma > wrote: > > > It's true that hlc clock is very slower than system, but is it really = a > > bottleneck? I mean 7mil ops/sec with 16 threads doesn't sound bottlenec= k > > because: > > - It's like 70 times of any RS' throughput (assuming 100k write > > throughput) > > - It's certainly enough for meta operations. > > What say? > > > > But i agree that we should try to make it better and file a jira for > > followup. > > > > > > On Fri, Aug 25, 2017 at 11:53 AM, Enis S=C3=B6ztutar > > wrote: > > > > > Indeed it seems like a perf improvement in the code HLC clock is need= ed > > > before the merge. Do you mind creating a sub ticket for this. > > > > > > Enis > > > > > > On Fri, Aug 25, 2017 at 10:54 AM, Amit Patel > > > wrote: > > > > > > > Just as an update with regard to performance: getting the time from > or > > > > updating the hybrid logical clock is quite expensive (see clocks > > > > microbenchmark > > > > > > > focusedCommentId=3D16141932&page=3Dcom.atlassian.jira. > > > > plugin.system.issuetabpanels:comment-tabpanel#comment-16141932>) > > > > to the extent that it would be a blocker for this work. There is > > however > > > > certainly room for improvement given that the current implementatio= n > > uses > > > > synchronized blocks for both Clock#now and Clock#update. > > > > > > > > On Wed, Aug 23, 2017 at 6:18 PM, Enis S=C3=B6ztutar > > wrote: > > > > > > > > > Thanks Amit for continuing on the work. > > > > > > > > > > I am biased, but of course would like to see this merged back to > > master > > > > > (and possibly make it to 2.0) once the issues are ironed out. We > can > > > > > eliminate a very large class of problems with a mathematically > sound > > > > > strategy. > > > > > > > > > > Enis > > > > > > > > > > On Tue, Aug 22, 2017 at 1:28 PM, Stack wrote: > > > > > > > > > > > Look at the pretty HLC timestamps in meta after a run: > > > > > > > > > > > > hbase:meta > > > > > > column=3Dtable:state, timestamp=3D1576463246879096833= , > > > > > value=3D\x08\x00 > > > > > > hbase:namespace > > > > > > column=3Dtable:state, timestamp=3D157646036991056281= 7, > > > > > > value=3D\x08\x00 > > > > > > hbase:namespace,,1503429763610.6d365281d5ca8ee0bc0fa12cdf33ec > b5. > > > > > > column=3Dinfo:regioninfo, timestamp=3D157646259330482= 1761, > > > > > > value=3D{ENCODED =3D> 6d365281d5ca8ee0bc0fa12cdf33ecb5, NAME = =3D> > > > > > > 'hbase:namespace,,1503429763610.6d365281d5ca8ee0bc0fa12cdf33ec > > b5.', > > > > > > STARTKEY =3D> '', ENDKEY =3D> ''} > > > > > > hbase:namespace,,1503429763610.6d365281d5ca8ee0bc0fa12cdf33ec > b5. > > > > > > column=3Dinfo:seqnumDuringOpen, > > > timestamp=3D1576462593304821761, > > > > > > value=3D\x00\x00\x00\x00\x00\x00\x00\x15 > > > > > > hbase:namespace,,1503429763610.6d365281d5ca8ee0bc0fa12cdf33ec > b5. > > > > > > column=3Dinfo:server, timestamp=3D1576462593304821761= , > value=3D > > > > > > ve0536.halxg.cloudera.com:16020 > > > > > > hbase:namespace,,1503429763610.6d365281d5ca8ee0bc0fa12cdf33ec > b5. > > > > > > column=3Dinfo:serverstartcode, > > timestamp=3D1576462593304821761, > > > > > > value=3D1503431013602 > > > > > > hbase:namespace,,1503429763610.6d365281d5ca8ee0bc0fa12cdf33ec > b5. > > > > > > column=3Dinfo:sn, timestamp=3D1576462593050017795, va= lue=3D > > > > > > ve0536.halxg.cloudera.com,16020,1503431013602 > > > > > > hbase:namespace,,1503429763610.6d365281d5ca8ee0bc0fa12cdf33ec > b5. > > > > > > column=3Dinfo:state, timestamp=3D1576462593304821761, > > > value=3DOPEN > > > > > > > > > > > > St.Ack > > > > > > > > > > > > > > > > > > > > > > > > On Tue, Aug 22, 2017 at 1:26 PM, Stack wrote= : > > > > > > > > > > > > > Nice work Amit. Idea of merging sounds good to me. Our metada= ta > > > > system > > > > > > > will run w/ a new rigor as HLC allows us leave behind a whole > > class > > > > of > > > > > > > issues. > > > > > > > > > > > > > > I ran the HLC branch on small cluster for a while w/ chaos. T= he > > > ITBLL > > > > > job > > > > > > > passed so basically works I'd say. +1 from me on merge. > > > > > > > > > > > > > > St.Ack > > > > > > > > > > > > > > On Mon, Aug 21, 2017 at 1:29 PM, Amit Patel < > > > amit.patel@cloudera.com > > > > > > > > > > > > wrote: > > > > > > > > > > > > > >> Hi everyone, > > > > > > >> > > > > > > >> I=E2=80=99d like to begin the discussion of merging the curr= ent HLC > work > > > > with > > > > > > >> master. Note that the current work is not ready to merge yet > > since > > > > > there > > > > > > >> are a few remaining issues (see below). For reference, > > HBASE-14070 > > > > > > >> proposes > > > using > > > > > > hybrid > > > > > > >> logical clocks, which combine both logical and physical cloc= ks > > to > > > > > > capture > > > > > > >> not only causality relationship between events, but also > > physical > > > > time > > > > > > at > > > > > > >> which events occur. HLC can be enabled on a per-table basis > and > > at > > > > the > > > > > > >> moment just the meta table has HLC enabled by default (the > other > > > > > tables > > > > > > >> default to use the system clock). An initial design document > > > created > > > > > by > > > > > > >> Enis Soztutar can be found here > > > > > > >> > > > > > >> T4e_bXy8P9h6kWC05Bhw/edit#>. > > > > > > >> The more recent status document created by Sai Teja Ranuva c= an > > be > > > > > found > > > > > > >> here > > > > > > >> > > > > > >> kZiZCwFhbHZ7JXRjg3oA/edit#heading=3Dh.881hwl2sdbvx>. > > > > > > >> > > > > > > >> > > > > > > >> Changes > > > > > > >> > > > > > > >> The new classes that would be introduced include: a Clock > > > interface > > > > > with > > > > > > >> three clock implementations mentioned above and enums for th= e > > > clock > > > > > and > > > > > > >> timestamp type. The three clock implementations are hybrid > > > logical, > > > > > > >> system > > > > > > >> monotonic, and system clocks and each generate 64-bit > > timestamps. > > > > > > >> Timestamps from the system monotonic and system clock > represent > > > > > physical > > > > > > >> time and are directly backwards compatible. > > > > > > >> > > > > > > >> Users can set the clock type of a table during table > creation. A > > > > > table=E2=80=99s > > > > > > >> clock type cannot be changed after the table has been create= d. > > For > > > > > > tables > > > > > > >> whose clock type is HLC, users would not be permitted to set > > their > > > > own > > > > > > >> timestamps for mutations. Certain events such as region > > > assignment, > > > > > > >> unassignment, and recovery update the clocks upon receiving > > > > timestamps > > > > > > >> externally. > > > > > > >> > > > > > > >> Benefits > > > > > > >> > > > > > > >> > > > > > > >> - > > > > > > >> > > > > > > >> Hybrid logical clocks (and even system monotonic clocks) > can > > > > solve > > > > > a > > > > > > >> variety of long standing issues related to time highlight= ed > > > here > > > > > > >> 1LL2GAodiYi0waBz5ODGL4L > > > > > > >> DT4e_bXy8P9h6kWC05Bhw/edit#heading=3Dh.msabldfs8oly>. > > > > > > >> > > > > > > >> - > > > > > > >> > > > > > > >> Future work with hybrid logical clocks would include > enabling > > > > them > > > > > > with > > > > > > >> user tables. Ideally we would want HLC to be used > everywhere. > > > > > Further > > > > > > >> work > > > > > > >> such as global point-in-time snapshots can leverage HLC > > > > > > >> > > > > > > >> > > > > > > >> Remaining issues > > > > > > >> > > > > > > >> There are still a few remaining issues to close out before > > > actually > > > > > > >> merging, but I wanted to at least start the discussion. > > Currently > > > I > > > > am > > > > > > >> working on fixing remaining tests that are either failing or > > > timing > > > > > out > > > > > > in > > > > > > >> the public branch > job/HBASE-14070.HLC/ > > > > > > > > as > > > > > > >> well > > > > > > >> as doing local performance tests, and cluster tests. Some of > the > > > > > > remaining > > > > > > >> issues we are tracking are: > > > > > > >> > > > > > > >> > > > > > > >> - > > > > > > >> > > > > > > >> HBASE-18542 (Perf numbers) > > > > > > >> > > > > > > >> - > > > > > > >> > > > > > > >> HBASE-18508 (Fixing unit tests) > > > > > > >> > > > > > > >> - > > > > > > >> > > > > > > >> HBASE-18432 (Clock skew) > > > > > > >> > > > > > > >> > > > > > > >> Some brainstorming/discussions we also are tracking: > > > > > > >> > > > > > > >> - > > > > > > >> > > > > > > >> (HBASE-18643) Adding transaction id to Result > > > > > > >> > > > > > > >> - > > > > > > >> > > > > > > >> (HBASE-18642) Deprecate setting of timestamp in client fo= r > > HLC > > > > > > >> > > > > > > >> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > -- Appy > > > --=20 -- Appy --001a11435efc36121805579ae3cf--