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

DbNotificationListener Request Notification IDs in Batches

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • None
    • None
    • None

    Description

      Every time a new notification event is logged into the database, the sequence number for the ID of the even is incremented by one. It is very standard in database design to instead request a block of IDs for each fetch from the database. The sequence numbers are then handed out locally until the block of IDs is exhausted. This allows for fewer database round-trips and transactions, at the expense of perhaps burning a few IDs.

      Burning of IDs happens when the server is restarted in the middle of a block of sequence IDs. That is, if the HMS requests a block of 10 ids, and only three have been assigned, after the restart, the HMS will request another block of 10, burning (wasting) 7 IDs. As long as the blocks are not too small, and restarts are infrequent, then few IDs are lost.

      Attachments

        Issue Links

          Activity

            People

              belugabehr David Mollitor
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m