Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-2124

Hybrid Logical Clocks for Phoenix



    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:


      Over at the HBase land, we have a proposal to use HLC for HBase updates. I think that we can also use them in Phoenix, so that we have a strictly monotonic clock and timestamps become reliable. I believe that HL clocks have the potential to eliminate clock-skew problems that Phoenix is susceptible for.

      I have to spend some more time to fill up the Phoenix part of the proposal to see what exactly needs to be changed. But please feel free to suggest and comment on whether this makes sense for Phoenix.

      Below is the proposal for HBASE-14070:
      HBase and Phoenix uses systems physical clock (PT) to give timestamps to events (read and writes). This works mostly when the system clock is strictly monotonically increasing and there is no cross-dependency between servers clocks. However we know that leap seconds, general clock skew and clock drift are in fact real.
      This jira proposes using Hybrid Logical Clocks (HLC) as an implementation of hybrid physical clock + a logical clock. HLC is best of both worlds where it keeps causality relationship similar to logical clocks, but still is compatible with NTP based physical system clock. HLC can be represented in 64bits.
      A design document is attached and also can be found here:


          Issue Links



              • Assignee:
                enis Enis Soztutar
                enis Enis Soztutar
              • Votes:
                0 Vote for this issue
                4 Start watching this issue


                • Created: