apache/druid · warning · IOException
Interrupted while waiting for mount
Error message
Interrupted while waiting for mount
What it means
PartialSegmentBundleCacheEntry.awaitMount blocks on the Future produced by the asynchronous mount operation. If the waiting thread is interrupted, it restores the interrupt flag and wraps the InterruptedException in an IOException to signal that the mount result could not be observed.
Solutions
- Retain the interrupt status (the code already does Thread.currentThread().interrupt()) and let shutdown proceed; retry the segment load after the node is healthy.
- Avoid interrupting load threads during normal operation; ensure graceful shutdown waits for pending mounts.
- Check for overly aggressive cancellation in code that calls loadSegment or mount paths.
Example fix
// before
try { entry.mount(location); } catch (IOException e) { LOGGER.warn(e, "mount failed"); }
// after
try { entry.mount(location); }
catch (IOException e) {
if (Thread.currentThread().isInterrupted()) { /* interrupted during mount; back off and retry */ }
else { LOGGER.warn(e, "mount failed"); }
} Defensive patterns
Strategy: try-catch
Validate before calling
if (Thread.currentThread().isInterrupted()) {
// avoid starting a blocking mount wait on an already-interrupted thread
throw new InterruptedException();
} Try / catch
try {
entry.mount(location);
} catch (IOException e) {
if (e.getCause() instanceof InterruptedException || Thread.currentThread().isInterrupted()) {
Thread.currentThread().interrupt(); // preserve flag; abandon this mount, coordinator will retry
return;
}
throw e;
} Prevention
- Don't interrupt load/reload threads except during shutdown.
- Use graceful shutdown that drains pending segment mounts.
- Avoid long-lived blocking waits racing with segment drops.
- Retry segment loads after interruption; mounts are idempotent.
When it happens
Trigger: A thread calling mount() on a PartialSegmentBundleCacheEntry is interrupted (Thread.interrupt()) while blocked in future.get() waiting for the async mount to complete.
Common situations: Historical server shutdown or segment-drop racing with an in-flight partial mount; query/ingestion threads cancelled while waiting for lazy segment loading; executor shutdown during reload.
Related errors
- Interrupted while waiting for mount
- cannot add element of size
- Could not populate cache
- Doesn't make sense to use Hybrid cache with both use and…
- Exception pulling item from cache
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/3b7414df8bd2a979.
Report an issue: GitHub.
Appendix: source
Thrown at server/src/main/java/org/apache/druid/segment/loading/PartialSegmentBundleCacheEntry.java:677
}
final Set<String> present = bundleNames(fileMapper);
// legacy v10 segments from before bundle field was persisted in the segment
if (present.size() == 1 && present.contains(SegmentFileBuilder.ROOT_BUNDLE_NAME)) {
return SegmentFileBuilder.ROOT_BUNDLE_NAME;
}
// Requested bundle is absent and there are named bundles present: leave the name as-is so the caller fails
// loudly (forBundle throws "no containers") rather than silently serving the wrong data.
return requestedBundleName;
}
private static void awaitMount(SettableFuture<Void> future) throws IOException
{
try {
future.get();
}
catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new IOException("Interrupted while waiting for mount", e);
}
catch (ExecutionException e) {
final Throwable cause = e.getCause() == null ? e : e.getCause();
switch (cause) {
case IOException ioException -> throw ioException;
case RuntimeException runtimeException -> throw runtimeException;
case Error error -> throw error;
default -> throw DruidException.defensive(e, "mount failed");
}
}
}
private static void releaseHolds(Collection<StorageLocation.ReservationHold<?>> holds)
{
for (StorageLocation.ReservationHold<?> hold : holds) {
try {
hold.close();
}View on GitHub (pinned to 9b90983fd2)