{"record":{"id":"d0299b0f17770a07","repo":"apache/druid","slug":"forceguaranteedrollup-is-incompatible-with-partiti","errorCode":null,"errorMessage":"forceGuaranteedRollup is incompatible with partitionsSpec: %s","messagePattern":"forceGuaranteedRollup is incompatible with partitionsSpec: (.+?)","errorType":"validation","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java","lineNumber":285,"sourceCode":"                                           && ingestionSchema.getDataSchema()\n                                                             .getGranularitySpec()\n                                                             .inputIntervals()\n                                                             .isEmpty();\n    if (missingIntervalsInOverwriteMode) {\n      addToContext(Tasks.FORCE_TIME_CHUNK_LOCK_KEY, true);\n    }\n\n    awaitSegmentAvailabilityTimeoutMillis = ingestionSchema.getTuningConfig().getAwaitSegmentAvailabilityTimeoutMillis();\n    this.ingestionState = IngestionState.NOT_STARTED;\n    this.isCompactionTask = isCompactionTask;\n  }\n\n  private static void checkPartitionsSpecForForceGuaranteedRollup(PartitionsSpec partitionsSpec)\n  {\n    if (!partitionsSpec.isForceGuaranteedRollupCompatible()) {\n      String incompatibiltyMsg = partitionsSpec.getForceGuaranteedRollupIncompatiblityReason();\n      String msg = \"forceGuaranteedRollup is incompatible with partitionsSpec: \" + incompatibiltyMsg;\n      throw new ISE(msg);\n    }\n  }\n\n  @Override\n  public String getType()\n  {\n    return TYPE;\n  }\n\n  @Nonnull\n  @JsonIgnore\n  @Override\n  public Set<ResourceAction> getInputSourceResources()\n  {\n    return getIngestionSchema().getIOConfig().getInputSource() != null ?\n           getIngestionSchema().getIOConfig().getInputSource().getTypes()\n                               .stream()\n                               .map(AuthorizationUtils::createExternalResourceReadAction)","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/ParallelIndexSupervisorTask.java#L267-L303","documentation":"Thrown by checkPartitionsSpecForForceGuaranteedRollup when forceGuaranteedRollup (perfect rollup) is enabled but the configured partitionsSpec does not support it, per partitionsSpec.isForceGuaranteedRollupCompatible(). Only hash and single-dim/range partitioning with fixed shard counts are compatible with guaranteed rollup.","triggerScenarios":"Setting forceGuaranteedRollup=true with a dynamic partitionsSpec (dynamic partitioning cannot guarantee perfect rollup), or a hash/dim partitionsSpec missing numShards/maxNumPartitions settings required for deterministic partitioning.","commonSituations":"Migrating task configs from append-mode batch to perfect-rollup batch without changing 'partitionsSpec' from dynamic; copying tuning configs between tasks; auto-generated specs defaulting to dynamic partitioning.","solutions":["Replace dynamic partitionsSpec with a hash or range (single_dim) partitionsSpec including numShards (or maxNumPartitions for hash).","Set forceGuaranteedRollup=false to accept best-effort (append-compatible) rollup if perfect rollup is not required.","Pre-compute numShards (or use maxNumPartitions with hash partitioning) so partition counts are fixed."],"exampleFix":"// before\n\"partitionsSpec\": { \"type\": \"dynamic\", \"maxTotalRows\": 5000000 }, \"forceGuaranteedRollup\": true\n// after\n\"partitionsSpec\": { \"type\": \"hash\", \"numShards\": 4 }, \"forceGuaranteedRollup\": true","handlingStrategy":"validation","validationCode":"if (tuningConfig.isForceGuaranteedRollup()\n    && !(partitionsSpec instanceof HashedPartitionsSpec || \"single_dim\".equals(partitionsSpec.getType()))) {\n  throw new IllegalArgumentException(\"forceGuaranteedRollup requires hash or single_dim partitionsSpec with fixed numShards\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never combine forceGuaranteedRollup=true with dynamic partitionsSpec","Provide numShards (hash) or partitionDimensions/maxNumPartitions explicitly","Document tuning-config templates so append vs perfect-rollup variants are not mixed"],"tags":["partitioning","perfect-rollup","tuning-config"],"backgroundTag":"incompatible-source-type","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"}