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

Exceptions in MetastoreCacheInitializer should probably not prevent HMS from starting up

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.7.0
    • Hdfs Plugin
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: