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

TestDbTxnManager2#testLocksInSubquery failing in branch-2.1

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: Closed
    • Major
    • Resolution: Fixed
    • 2.1.1
    • 2.1.1, 2.2.0
    • None
    • None

    Description

      checkCmdOnDriver(driver.compileAndRespond("insert into R select * from S where a in (select a from T where b = 1)"));
          txnMgr.openTxn("three");
          txnMgr.acquireLocks(driver.getPlan(), ctx, "three");
          locks = getLocks();
          Assert.assertEquals("Unexpected lock count", 3, locks.size());
          checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "T", null, locks.get(0));
          checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "S", null, locks.get(1));
          checkLock(LockType.SHARED_READ, LockState.ACQUIRED, "default", "R", null, locks.get(2));
      

      This test case is failing. The expected order of locks is supposed to be T, S, R. But upon closer inspection, it seems to be R,S,T.

      I'm not much familiar with what these locks are and why the order is important. Raising this jira so while I try to understand it all. Meanwhile, if somebody can explain here, would be helpful.

      Attachments

        1. HIVE-14357.patch
          48 kB
          Sergey Shelukhin

        Activity

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

          People

            sershe Sergey Shelukhin Assign to me
            prongs Rajat Khandelwal
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment