apache/druid · error · MSQException
Context param[ ] cannot be explicitly set to false when…
Error message
Context param[%s] cannot be explicitly set to false when context param[%s] is set to true. Either remove the context param[%s] or explicitly set it to true.
What it means
IndexerControllerContext.makeQueryKernelConfig rejects a query that sets the old context key CTX_DURABLE_SHUFFLE_STORAGE explicitly to false while the newer CTX_FAULT_TOLERANCE is true. The two keys must agree; a contradictory combination would make kernel durability config ambiguous, so it fails fast with UnknownFault carrying the formatted message.
Solutions
- Remove the durableShuffleStorage context key when faultTolerance is enabled
- Set durableShuffleStorage explicitly to true alongside faultTolerance=true
- Update saved queries/templates to use only faultTolerance going forward
Example fix
// before
Map<String, Object> ctx = Map.of("faultTolerance", true, "durableShuffleStorage", false);
// after
Map<String, Object> ctx = Map.of("faultTolerance", true); Defensive patterns
Strategy: validation
Validate before calling
Object ft = ctx.get("faultTolerance");
Object ds = ctx.get("durableShuffleStorage");
if (Boolean.TRUE.equals(ft) && Boolean.FALSE.equals(ds)) {
throw new IllegalArgumentException("Remove durableShuffleStorage=false when faultTolerance=true");
} Prevention
- Standardize on the faultTolerance context key and stop emitting durableShuffleStorage in generated contexts
- Audit saved dashboards/templates for stale context flags
- Centralize query-context construction in one helper
When it happens
Trigger: Query context contains {"faultTolerance": true, "durableShuffleStorage": false}; applications that set durableShuffleStorage=false unconditionally while another layer (BI tool, template) enables faultTolerance.
Common situations: Migrating queries from the legacy durableShuffleStorage flag to faultTolerance but leaving stale false values in saved dashboards or JDBC connection contexts; copy-pasted context maps combining new and old flags.
Understand the failure class
Background: Conflicting config options: "cannot be used together" — configuration validation errors across open-source libraries — this error's family across 162 libraries.
Related errors
- Cannot have fault tolerance without durable storage
- Cannot pipeline with fault tolerance
- Broadcast input number out of range
- BroadcastTablesTooLarge
- Can not supply empty segments as input, please use either…
AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07).
Data as JSON: /api/errors/2e03eb6107599579.
Report an issue: GitHub.
Appendix: source
Thrown at multi-stage-query/src/main/java/org/apache/druid/msq/indexing/IndexerControllerContext.java:293
final ControllerMemoryParameters memoryParameters
)
{
final QueryContext queryContext = querySpec.getContext();
final int maxConcurrentStages =
MultiStageQueryContext.getMaxConcurrentStagesWithDefault(queryContext, DEFAULT_MAX_CONCURRENT_STAGES);
final boolean isFaultToleranceEnabled = MultiStageQueryContext.isFaultToleranceEnabled(queryContext);
final boolean isDurableStorageEnabled;
if (isFaultToleranceEnabled) {
if (!queryContext.containsKey(MultiStageQueryContext.CTX_DURABLE_SHUFFLE_STORAGE)) {
// if context key not set, enable durableStorage automatically.
isDurableStorageEnabled = true;
} else {
// if context key is set, and durableStorage is turned on.
if (MultiStageQueryContext.isDurableStorageEnabled(queryContext)) {
isDurableStorageEnabled = true;
} else {
throw new MSQException(
UnknownFault.forMessage(
StringUtils.format(
"Context param[%s] cannot be explicitly set to false when context param[%s] is"
+ " set to true. Either remove the context param[%s] or explicitly set it to true.",
MultiStageQueryContext.CTX_DURABLE_SHUFFLE_STORAGE,
MultiStageQueryContext.CTX_FAULT_TOLERANCE,
MultiStageQueryContext.CTX_DURABLE_SHUFFLE_STORAGE
)
)
);
}
}
} else {
isDurableStorageEnabled = MultiStageQueryContext.isDurableStorageEnabled(queryContext);
}
return ControllerQueryKernelConfig
.builder()View on GitHub (pinned to 9b90983fd2)