apache/druid · error · UnsupportedOperationException

Guaranteed rollup is not supported

Error message

Guaranteed rollup is not supported

What it means

SinglePhaseSubTask explicitly rejects tuning configs that set forceGuaranteedRollup=true. In the single-phase parallel (native parallel) batch ingestion mode, perfect (guaranteed) rollup is not supported because subtasks cannot coordinate partitioning to guarantee a single final segment per rollup key; only best-effort rollup is possible. The check fires in the subtask constructor, so any subtask spec created with that flag fails immediately.

Source

Thrown at indexing-service/src/main/java/org/apache/druid/indexing/common/task/batch/parallel/SinglePhaseSubTask.java:170

      // subtaskSpecId can be null only for old task versions.
      @JsonProperty("subtaskSpecId") @Nullable final String subtaskSpecId,
      @JsonProperty("numAttempts") final int numAttempts, // zero-based counting
      @JsonProperty("spec") final ParallelIndexIngestionSpec ingestionSchema,
      @JsonProperty("context") final Map<String, Object> context
  )
  {
    super(
        getOrMakeId(id, TYPE, ingestionSchema.getDataSchema().getDataSource()),
        groupId,
        taskResource,
        ingestionSchema.getDataSchema().getDataSource(),
        context,
        AbstractTask.computeBatchIngestionMode(ingestionSchema.getIOConfig()),
        supervisorTaskId
    );

    if (ingestionSchema.getTuningConfig().isForceGuaranteedRollup()) {
      throw new UnsupportedOperationException("Guaranteed rollup is not supported");
    }

    this.subtaskSpecId = subtaskSpecId;
    this.numAttempts = numAttempts;
    this.ingestionSchema = ingestionSchema;
    this.missingIntervalsInOverwriteMode = ingestionSchema.getIOConfig().isAppendToExisting() != true
                                           && ingestionSchema.getDataSchema()
                                                             .getGranularitySpec()
                                                             .inputIntervals()
                                                             .isEmpty();
    if (missingIntervalsInOverwriteMode) {
      addToContext(Tasks.FORCE_TIME_CHUNK_LOCK_KEY, true);
    }
    this.ingestionState = IngestionState.NOT_STARTED;
  }

  @Override
  public String getType()

View on GitHub (pinned to 9b90983fd2)

Solutions

  1. Set forceGuaranteedRollup=false (or remove it) in the tuningConfig of the single-phase parallel ingestion spec
  2. If perfect rollup is mandatory, use the two-phase parallel ingestion mode (with partitioning via HashPartitionSegmentMaster or range partitioning) instead of single-phase
  3. Regenerate the spec via the UI, which omits unsupported tuning options for single-phase tasks

Example fix

// before
"tuningConfig": { "type": "index_parallel", "forceGuaranteedRollup": true }
// after
"tuningConfig": { "type": "index_parallel", "forceGuaranteedRollup": false }
Defensive patterns

Strategy: validation

Validate before calling

// validate spec before submission
ParallelIndexTuningConfig tuning = schema.getTuningConfig();
if (tuning.isForceGuaranteedRollup()) {
  throw new IAE("forceGuaranteedRollup is unsupported for single-phase parallel ingestion");
}

Try / catch

catch (UnsupportedOperationException e) {
  if (e.getMessage().equals("Guaranteed rollup is not supported")) {
    throw new UserConfigException("remove forceGuaranteedRollup from tuningConfig or use two-phase mode");
  } throw e;
}

Prevention

When it happens

Trigger: Creating a SinglePhaseSubTask (used by single-phase parallel index tasks) whose ParallelIndexTuningConfig has forceGuaranteedRollup=true — e.g., copying a tuning config from a two-phase (index_parallel with perfect rollup) setup.

Common situations: Users migrating from two-phase parallel ingestion configs that used guaranteed rollup; templated ingestion specs where forceGuaranteedRollup is left enabled; converting compaction/reindexing tasks to single-phase mode without adjusting tuning config.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/druid@9b90983fd2 (2026-09-07). Data as JSON: /api/errors/0aad0a4743943949. Report an issue: GitHub.