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

UpdateForwarder handling of failed updates is boken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.7.0, 2.0.0
    • None
    • Hdfs Plugin
    • 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

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

            Dates

              Created:
              Updated: