{"record":{"id":"2fe9dd2053f33ff0","repo":"apache/druid","slug":"failed-to-load-segment-s-in-reserved-location-s","errorCode":null,"errorMessage":"Failed to load segment[%s] in reserved location[%s]","messagePattern":"Failed to load segment\\[(.+?)\\] in reserved location\\[(.+?)\\]","errorType":"exception","errorClass":"SegmentLoadingException","httpStatus":null,"severity":"error","filePath":"server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java","lineNumber":2265,"sourceCode":"        } else if (isWeak) {\n          mountLocation.trackWeakLoad(dataSegment.getSize());\n        } else {\n          mountLocation.trackStaticLoad(dataSegment.getSize());\n        }\n\n        if (config.isVirtualStorageEphemeral()) {\n          setOnUnmount(() -> deleteSegmentInfoFile(dataSegment));\n        }\n      }\n      catch (SegmentLoadingException e) {\n        try {\n          log.makeAlert(\n              e,\n              \"Failed to load segment in current location [%s], try next location if any\",\n              location.getPath().getAbsolutePath()\n          ).addData(\"location\", location.getPath().getAbsolutePath()).emit();\n\n          throw new SegmentLoadingException(\n              \"Failed to load segment[%s] in reserved location[%s]\",\n              dataSegment.getId(),\n              location.getPath().getAbsolutePath()\n          );\n        }\n        finally {\n          unmount();\n        }\n      }\n      catch (Throwable t) {\n        unmount();\n        throw t;\n      }\n      finally {\n        CloseableUtils.closeAndSuppressExceptions(selfHold, e -> log.warn(e, \"Failed to release mount hold[%s]\", id));\n      }\n    }\n","sourceCodeStart":2247,"sourceCodeEnd":2283,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/server/src/main/java/org/apache/druid/segment/loading/SegmentLocalCacheManager.java#L2247-L2283","documentation":"Thrown when loading a segment into a pre-reserved location fails after an alert is emitted ('Failed to load segment in current location [%s], try next location if any'). It marks the specific reserved location as failed for this segment; if other locations exist the load may be retried there.","triggerScenarios":"loadInLocation on a reserved StorageLocation throws (download error, segment unpacking failure, IO error) while the segment was assigned to that location's hold.","commonSituations":"Transient deep-storage/network errors during download; disk full or IO errors on the reserved location; corrupted downloaded segment files causing index open failures.","solutions":["Inspect the alert and the wrapped exception for the location-specific root cause (network vs disk vs segment corruption).","Ensure other cache locations are configured so the segment can fall to the next location; this error is retriable there.","Free space or fix disk health on the failing location path.","Retry the load; repeated failures on the same location indicate persistent hardware or permission problems."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { loadIntoReservedLocation(segment, location); } catch (SegmentLoadingException e) { log.warn(e, \"Will try next configured location\"); }","preventionTips":["Configure at least two cache locations for per-location failover.","Keep reserved location disks healthy with free-space alerts.","Watch makeAlert events for repeated failures on the same location path."],"tags":["segment-cache","segment-loading","download-failed","retry"],"backgroundTag":"file-write-failed","analyzedSha":"9b90983fd291f26935af934383ce360473179e4d","analyzedAt":"2026-09-07T13:32:30.957Z","contentChangedAt":"2026-09-07T13:32:30.957Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}