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

Exceptions in MetastoreCacheInitializer should probably not prevent HMS from starting up

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.7.0
    • Component/s: Hdfs Plugin
    • Labels:
      None

      Description

      Right now if there is an error condition in evaluating paths in MetastoreCacheInitializer in one of the tasks, we throw a Runtime Exception (in Sentry-888). Changed the behavior to be:

      • Retry the failed tasks x times. Each retry has a y millis wait duration. x and y are based upon the user config (sentry.hdfs.sync.metastore.cache.retry.max.num and sentry.hdfs.sync.metastore.cache.retry.wait.duration.millis).
      • After retry failure, throw exception or sync incomplete paths update based on user config (sentry.hdfs.sync.metastore.cache.fail.on.partial.update). The default values is fail on partial update, which will throw runtime exception.
      for (Future<CallResult> result : results) {
            CallResult callResult = result.get();
      
            // Fail the HMS startup if tasks are not all successful and
            // fail on partial updates flag is set in the config.
            if (callResult.getSuccessStatus() == false && failOnRetry) {
              throw new RuntimeException(callResult.getFailure());
            }
          }
      

        Attachments

        1. SENTRY-957.002.patch
          8 kB
          Hao Hao
        2. SENTRY-957.001.patch
          8 kB
          Hao Hao

          Issue Links

            Activity

              People

              • Assignee:
                hahao Hao Hao
                Reporter:
                sravya Sravya Tirukkovalur
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: