Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-11778

Scale timestamps by 1000

    XMLWordPrintableJSON

Details

    • Brainstorming
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • Phoenix

    Description

      The KV timestamps are used for various reasons:

      1. ordering of KVs
      2. resolving conflicts
      3. enforce TTL

      Currently we assume that the timestamps have a resolution of 1ms, and because of that we made the resolution at which we can determine time identical to the resolution at which we can store time.
      I think it is time to disentangle the two... At least allow a higher resolution of time to be stored. That way we could have a centralized transaction oracle that produces ids that relate to wall clock time, and at the same time allow producing more than 1000/s.

      The simplest way is to just store time in us (microseconds). I.e. we'd still collect time in ms by default and just multiply that with 1000 before we store it. With 8 bytes that still gives us a range of 292471 years.

      We'd have grandfather in old data. Could write a metadata entry into each HFile declaring what the TS resolution is if it is different from ms.

      Not sure, yet, how this would relate to using the TS for things like seqIds.

      Let's do some brainstorming.

      Attachments

        Activity

          People

            Unassigned Unassigned
            larsh Lars Hofhansl
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: