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

Hive notifications serialize all write DDL operations

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

Details

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

    Description

      The implementation of DbNotificationListener uses a single row to store current notification ID and uses SELECT FOR UPDATE to lock the row. This serializes all write DDL operations which isn't good.

      We should consider using database auto-increment for notification ID instead. Especially on mMySQL/innoDb it is supported natively with relatively light-weight locking.

      This creates potential issue for consumers though because such IDs may have holes. There are two types of holes - transient hole for a transaction which have not committed yet and will be committed shortly and permanent holes for transactions that fail. Consumers need to deal with it. It may be useful to add DB-generated timestamp as well to assist in recovery from holes.

      Attachments

        Issue Links

        Activity

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

          People

            Unassigned Unassigned Assign to me
            akolb Alex Kolbasov

            Dates

              Created:
              Updated:

              Slack

                Issue deployment