Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-18570

ACID IOW implemented using base may delete too much data

Log workAgile BoardRank to TopRank to BottomBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • None
    • Transactions
    • None
    • Insert Overwrite commands even on transactional tables will acquire Exclusive locks to ensure correctness. This will be improved upon to allow greater concurrency.

    Description

      Suppose we have a table with delta_0 insert data.
      Txn 1 starts an insert into delta_1.
      Txn 2 starts an IOW into base_2.
      Txn 2 commits.
      Txn 1 commits after txn 2 but its results would be invisible.

      Txn 2 deletes rows committed by txn 1 that according to standard ACID semantics it could have never observed and affected; this sequence of events is only possible under read-uncommitted isolation level (so, 2 deletes rows written by 1 before 1 commits them).
      This is if we look at IOW as transactional delete+insert. Otherwise we are just saying IOW performs "semi"-transactional delete.

      If 1 ran an update on rows instead of an insert, and 2 still ran an IOW/delete, row lock conflict (or equivalent) should cause one of them to fail.

      Attachments

        1. HIVE-18570.01.patch
          9 kB
          Eugene Koifman
        2. HIVE-18570.01-branch-3.patch
          9 kB
          Eugene Koifman
        3. HIVE-18570.02.patch
          11 kB
          Eugene Koifman
        4. HIVE-18570.02-branch-3.patch
          11 kB
          Eugene Koifman
        5. HIVE-18570.03.patch
          18 kB
          Eugene Koifman
        6. HIVE-18570.03-branch-3.patch
          11 kB
          Eugene Koifman
        7. HIVE-18570.04-branch-3.patch
          11 kB
          Eugene Koifman
        8. HIVE-18570.05-branch-3.patch
          18 kB
          Eugene Koifman

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            ekoifman Eugene Koifman Assign to me
            sershe Sergey Shelukhin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment