Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21402

Compaction state remains 'working' when major compaction fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.0
    • 4.0.0-alpha-1
    • Transactions
    • None

    Description

      When calcite is not on the HMS classpath, and query based compaction is enabled then the compaction fails with NoClassDefFound error. Since the catch block only catches Exceptions the following code block is not executed:

      } catch (Exception e) {
        LOG.error("Caught exception while trying to compact " + ci +
            ".  Marking failed to avoid repeated failures, " + StringUtils.stringifyException(e));
        msc.markFailed(CompactionInfo.compactionInfoToStruct(ci));
        msc.abortTxns(Collections.singletonList(compactorTxnId));
      }
      

      So the compaction is not set to failed.

      Would be better to catch Throwable instead of Exception

      Attachments

        1. HIVE-21402.patch
          0.8 kB
          Peter Vary

        Activity

          People

            pvary Peter Vary
            pvary Peter Vary
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: