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 D282E200CEC for ; Mon, 21 Aug 2017 22:30:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D114D165311; Mon, 21 Aug 2017 20:30:25 +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 A64871652D6 for ; Mon, 21 Aug 2017 22:30:24 +0200 (CEST) Received: (qmail 23271 invoked by uid 500); 21 Aug 2017 20:30: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 22949 invoked by uid 99); 21 Aug 2017 20:30:23 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Aug 2017 20:30:23 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8D056C01E5 for ; Mon, 21 Aug 2017 20:30:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 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_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] autolearn=disabled Authentication-Results: spamd4-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 (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id lksQQJ6WaIwv for ; Mon, 21 Aug 2017 20:30:21 +0000 (UTC) Received: from mail-oi0-f51.google.com (mail-oi0-f51.google.com [209.85.218.51]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id ABB6E5F520 for ; Mon, 21 Aug 2017 20:30:20 +0000 (UTC) Received: by mail-oi0-f51.google.com with SMTP id r200so30603673oie.2 for ; Mon, 21 Aug 2017 13:30:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera.com; s=google; h=mime-version:from:date:message-id:subject:to; bh=D7DZVfkOTBdFmox6UjpHrFNvdlHafo9pYAKEmIXgh3s=; b=gcrA0Ly9nn2PGN0skCdHB+fYpnNLoEkiJo5Zu1oCo5k62xjntotvGH2NFNaQjL21gU 0v+d/u44hekG31tKirm+nEXlb/JvQvgow7pvWLbBmfVS60njSENLsDDnIodQqGp6JF8t xDMFtbNWjJJDl/fMTWSyrLF+fWKU5fgcDI052yYk3jEv9QXfUup0OSwg7xKZkY8V1VjJ 7GpWbCk81fnV///Lv4SBOsHitXksvUZePRKy6M4nSYsINKl9eMMuf7u5vYGIHygD7iky htfqc3dr49a0qmlRA52U5j0rcOg3pm1PNm5+41bp7tPDc87ibby5G7/NPDDu3SgugySx +8kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=D7DZVfkOTBdFmox6UjpHrFNvdlHafo9pYAKEmIXgh3s=; b=eJNsrM9K5teJMrYdf7d0D4R/gPETZI3WKW0hGayPz5ERXVo44v6LqR9LO6ZVVY2/cj zX3UGOi92/hZQ1E4ux3gacqBM0KhvIlFxoPE1BzrYqTcfAwDTGQUkdFS4d/yTk/DxprF 1mfmGzwLRgijpwDjKeJB6Cyu7Ip8MKoM3bdiQoFuXieP3W1TKUF0ELBrfhbaLk9MWqBj /McveLmNqcClqIda/PYbLg2/I5SuHJLczfWpIZNpm7uZiM9GIg8JkHU6PDzR6QyytKx/ mstYOQwfe3I+X3iIQhQ7sxlALxvBdUWQ5/1PjtLerCEhwjqPw01BTTmK8fK3I1sNKR3G Yq5A== X-Gm-Message-State: AHYfb5gG4aEINWQVJSG7quMJ0FsldCG8BYwxv7jARAxIPByQH37wxCp8 v9uu9DaEjZ7vTsAYObycgZLrwVn2/+dYEqFBAw== X-Received: by 10.202.85.209 with SMTP id j200mr2089418oib.119.1503347419686; Mon, 21 Aug 2017 13:30:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.202.10.148 with HTTP; Mon, 21 Aug 2017 13:29:39 -0700 (PDT) From: Amit Patel Date: Mon, 21 Aug 2017 13:29:39 -0700 Message-ID: Subject: [DISCUSS] Merging Hybrid Logical Clocks with Master To: dev@hbase.apache.org Content-Type: multipart/alternative; boundary="001a113cf802ecd5dc0557495845" archived-at: Mon, 21 Aug 2017 20:30:26 -0000 --001a113cf802ecd5dc0557495845 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi everyone, I=E2=80=99d like to begin the discussion of merging the current HLC work wi= th 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 clocks 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 . The more recent status document created by Sai Teja Ranuva can be found her= e . Changes The new classes that would be introduced include: a Clock interface with three clock implementations mentioned above and enums for the 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 created. 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 highlighted here . - Future work with hybrid logical clocks would include enabling them with user tables. Ideally we would want HLC to be used everywhere. Further wo= rk 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 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 for HLC --001a113cf802ecd5dc0557495845--