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

Prevent data loss for client-side local index maintanence in Omid

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      To prevent potential data loss if a split occurs while we're sending local index updates from the client for Omid transactions, we should include the end region boundary in the Mutation. We can check if the actual region end boundary match and if not, raise an exception which the client can react to by retrying.

      This is not a bug in HBase. This will happen because we are prefix Region start key to the index updates.

      Before Split":
      ===========
      Client side Region boundaries : [a, f)
      Server side Region boundaries : [a, f)
      base table keyvalue : <"cd", "value">
      Index table keyvalue : <"a|value", "cd">

      After split with split key "c":
      =====================
      Client side Region boundaries : [a, f)
      Server side Region boundaries : First child - [a, c), Second child - [c, f)
      base table keyvalue : <"cd", "value"> (it will be written to second child)
      Index table keyvalue : <"a|value", "cd"> (since as for the client cache region boundaries are [a,f) we still go with prefix "a" and it will be written to first child)

      After split as for the row key it's belongs to first child and that's why HBase allows it's not a problem.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jamestaylor James R. Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: