Uploaded image for project: 'Sentry'
  1. Sentry
  2. SENTRY-1462

UpdateForwarder handling of failed updates is boken

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.7.0, 2.0.0
    • Fix Version/s: None
    • Component/s: Hdfs Plugin
    • Labels:
      None

      Description

      The UpdateFollower class has the following logic:

        private void spawnInitialUpdater(final Updateable<K> updateable,
            final int initUpdateRetryDelay) {
          K firstFullImage = null;
          try {
            firstFullImage = imageRetreiver.retrieveFullImage(INIT_SEQ_NUM);
          } catch (Exception e) {
            LOGGER.warn("InitialUpdater encountered exception !! ", e);
            firstFullImage = null;
            Thread initUpdater = new Thread() {
              @Override
              public void run() {
                 ...
                 Retry logic here
              }
        ...
      }
      

      There is no synchronization with this retry thread. More over it isn't clear what is the benefit of such async recovery.

      For example, later in the code, handleUpdateNotification{} accesses updateable field without checking whether it is null or not, but even if it would, we may get inconsistency due to async nature of updates.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              akolb Alex Kolbasov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: