{"record":{"id":"eb42303633c19829","repo":"apache/druid","slug":"s-is-not-supported-for-partitionsspec-s","errorCode":null,"errorMessage":"%s is not supported for partitionsSpec[%s]","messagePattern":"(.+?) is not supported for partitionsSpec\\[(.+?)\\]","errorType":"exception","errorClass":"ISE","httpStatus":null,"severity":"error","filePath":"indexing-service/src/main/java/org/apache/druid/indexing/common/task/OverlordCoordinatingSegmentAllocator.java","lineNumber":134,"sourceCode":"    if (partitionsSpec.getType() == SecondaryPartitionType.LINEAR) {\n      if (taskLockHelper.isUseSegmentLock()) {\n        if (taskLockHelper.hasOverwritingRootGenerationPartition(interval) && (ingestionMode\n                                                                               != AbstractTask.IngestionMode.APPEND)) {\n          final OverwritingRootGenerationPartitions overwritingRootGenerationPartitions = taskLockHelper\n              .getOverwritingRootGenerationPartition(interval);\n          if (overwritingRootGenerationPartitions == null) {\n            throw new ISE(\"Can't find overwritingSegmentMeta for interval[%s]\", interval);\n          }\n          return new NumberedOverwritePartialShardSpec(\n              overwritingRootGenerationPartitions.getStartRootPartitionId(),\n              overwritingRootGenerationPartitions.getEndRootPartitionId(),\n              overwritingRootGenerationPartitions.getMinorVersionForNewSegments()\n          );\n        }\n      }\n      return NumberedPartialShardSpec.instance();\n    } else {\n      throw new ISE(\n          \"%s is not supported for partitionsSpec[%s]\",\n          OverlordCoordinatingSegmentAllocator.class.getName(),\n          partitionsSpec.getClass().getName()\n      );\n    }\n  }\n\n  @Override\n  public SequenceNameFunction getSequenceNameFunction()\n  {\n    return sequenceNameFunction;\n  }\n}\n","sourceCodeStart":116,"sourceCodeEnd":148,"githubUrl":"https://github.com/apache/druid/blob/9b90983fd291f26935af934383ce360473179e4d/indexing-service/src/main/java/org/apache/druid/indexing/common/task/OverlordCoordinatingSegmentAllocator.java#L116-L148","documentation":"OverlordCoordinatingSegmentAllocator only knows how to derive partial shard specs for certain partitionsSpec types; for any other (unknown/new) partitionsSpec it throws ISE naming the allocator and spec class. This is a defensive check that unsupported partitioning strategies aren't silently mishandled in range-based (non-dynamic) ingestion.","triggerScenarios":"Creating an OverlordCoordinatingSegmentAllocator with a partitionsSpec it doesn't support (e.g. a new/custom PartitionsSpec type, or DynamicPartitionsSpec passed where range-based allocation is expected) and then calling partialShardSpec.","commonSituations":"Adding a new PartitionsSpec implementation without updating the allocator; specs crafted by hand with mismatched partitionsSpec vs the coordinator's supported set; internal calls after a Druid version upgrade changing spec classes.","solutions":["Use a supported partitionsSpec (e.g. SingleDimensionPartitionsSpec or HashedPartitionsSpec as accepted by the range-based path) for this ingestion","If a new partitionsSpec type was added, extend OverlordCoordinatingSegmentAllocator.createPartialShardSpec to handle it","Check the Druid version for known bugs where the wrong partitionsSpec is wired into MSQ/parallel ingestion"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"if (!(partitionsSpec instanceof SingleDimensionPartitionsSpec)\n    && !(partitionsSpec instanceof HashedPartitionsSpec)) {\n  throw new IllegalArgumentException(partitionsSpec.getType() + \" unsupported for range-based allocation\");\n}","typeGuard":"boolean isSupportedPartitionsSpec(PartitionsSpec p) {\n  return p instanceof SingleDimensionPartitionsSpec || p instanceof HashedPartitionsSpec;\n}","tryCatchPattern":"try { allocator.partialShardSpec(...); } catch (ISE e) { if (e.getMessage().contains(\"is not supported for partitionsSpec\")) { fallbackToCompatibleAllocator(); } else { throw e; } }","preventionTips":["Only wire OverlordCoordinatingSegmentAllocator for partitionsSpec types it supports","Update the allocator whenever adding a new PartitionsSpec implementation","Pin ingestion spec generation to supported partitionsSpec types after Druid upgrades"],"tags":["druid","segment-allocation","partitions","unsupported"],"backgroundTag":"unsupported-operation","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"}