apache/hadoop · error · IOException

Interrupted waiting for doUpgrade() response

Error message

Interrupted waiting for doUpgrade() response

What it means

QuorumJournalManager.doUpgrade() applies the storage upgrade on every JournalNode and waits for ALL of them within dfs.qjm.operations.timeout. InterruptedException means the upgrade-driving thread was cancelled mid-wait and is converted to IOException.

Source

Thrown at hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java:696

    } catch (InterruptedException e) {
      throw new IOException("Interrupted waiting for doPreUpgrade() response");
    } catch (TimeoutException e) {
      throw new IOException("Timed out waiting for doPreUpgrade() response");
    }
  }

  @Override
  public void doUpgrade(Storage storage) throws IOException {
    QuorumCall<AsyncLogger, Void> call = loggers.doUpgrade(storage);
    try {
      call.waitFor(loggers.size(), loggers.size(), 0, timeoutMs,
          "doUpgrade");
      
      if (call.countExceptions() > 0) {
        call.rethrowException("Could not perform upgrade of one or more JournalNodes");
      }
    } catch (InterruptedException e) {
      throw new IOException("Interrupted waiting for doUpgrade() response");
    } catch (TimeoutException e) {
      throw new IOException("Timed out waiting for doUpgrade() response");
    }
  }
  
  @Override
  public void doFinalize() throws IOException {
    QuorumCall<AsyncLogger, Void> call = loggers.doFinalize();
    try {
      call.waitFor(loggers.size(), loggers.size(), 0, timeoutMs,
          "doFinalize");
      
      if (call.countExceptions() > 0) {
        call.rethrowException("Could not finalize one or more JournalNodes");
      }
    } catch (InterruptedException e) {
      throw new IOException("Interrupted waiting for doFinalize() response");
    } catch (TimeoutException e) {

View on GitHub (pinned to 2add963021)

Solutions

  1. Stop the interrupting source and rerun the upgrade command to completion.
  2. Inspect each JournalNode's directory state afterwards; upgrade steps are resumable but should not be left half-applied.
  3. Verify all JournalNodes are healthy so the rerun finishes within dfs.qjm.operations.timeout.
Defensive patterns

Strategy: retry

Try / catch

try {
  qjm.doUpgrade(storage);
} catch (IOException e) {
  if (Thread.currentThread().isInterrupted()
      || (e.getMessage() != null && e.getMessage().contains("Interrupted waiting for doUpgrade"))) {
    Thread.currentThread().interrupt();
    throw new IllegalStateException(
        "upgrade cancelled; inspect JN layout state and rerun", e);
  }
  throw e;
}

Prevention

When it happens

Trigger: The NameNode upgrade command is interrupted while JournalNodes are still upgrading their on-disk layouts — operator cancellation, automation timeout, or JVM shutdown.

Common situations: Cancelled or timed-out rolling upgrade orchestration; scripts killing the namenode during the upgrade window.

Related errors


AI-assisted analysis of apache/hadoop@2add963021 (2026-08-22). Data as JSON: /api/errors/1911254d3c0e5345. Report an issue: GitHub.