Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-872 Uber jira for HMS HA + Sentry HA redesign
  3. SENTRY-1895

Sentry should handle the case of multiple notifications with the same ID

    XMLWordPrintableJSON

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.0.0
    • Component/s: Sentry
    • Labels:
      None
    • Flags:
      Important

      Description

      As shown in HIVE-16886, notification IDs generated by Hive may be non-unique and there may be cases with different evnts sharing the same ID. This creates various problems for Sentry/Hive interaction and we should fine some short -term solution until it is fixed in Hive.

      The issue was addressed in SENTRY-1803 by removing a primary-key constraint on the notification Id which allows for multiple keys. But this creates other problems:

      1. We are using the primary key constraint to prevent multiple instances of Sentry from processing the same notifications multiple times.
      2. We are using max(notificationId) to find the last processed event. When the field is a primary key, this operation is an index scan, but when it isn't, it is a full table scan which is more expensive.

      We also have a few other problems caused by duplicate IDs which are not related and not addressed by SENTRY-1803:

      1. There is a synchronization mechanism between HMS and Sentry which ensures that a given event is processed. This doesn't work in the presence of duplicate IDs.
      2. Some events may be missed due to the way they are processed.

        Attachments

        1. SENTRY-1895.6.patch
          69 kB
          Sergio Peña
        2. SENTRY-1895.5.patch
          69 kB
          Sergio Peña
        3. SENTRY-1895.4.patch
          22 kB
          Sergio Peña
        4. SENTRY-1895.3.patch
          22 kB
          Sergio Peña
        5. SENTRY-1895.2.patch
          21 kB
          Sergio Peña
        6. SENTRY-1895.1.patch
          19 kB
          Sergio Peña

          Issue Links

            Activity

              People

              • Assignee:
                spena Sergio Peña
                Reporter:
                akolb Alex Kolbasov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: