This is an automated email from the ASF dual-hosted git repository. abhishekrb pushed a commit to branch peon_server_priorities in repository https://gitbox.apache.org/repos/asf/druid.git
commit 0b67dd4b8b03f5d8470c4d53d3e720acd549b27e Author: Abhishek Balaji Radhakrishnan <[email protected]> AuthorDate: Thu Feb 26 17:31:36 2026 -0800 Better error messages --- .../indexing/seekablestream/supervisor/SeekableStreamSupervisor.java | 4 ++-- .../seekablestream/supervisor/SeekableStreamSupervisorIOConfig.java | 3 ++- .../supervisor/SeekableStreamSupervisorIOConfigTest.java | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java index 843f0f1ca18..bc6706ea0c8 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisor.java @@ -4334,8 +4334,8 @@ public abstract class SeekableStreamSupervisor<PartitionIdType, SequenceOffsetTy if (unassignedServerPriorities.size() < replicas) { // Sanity check: if this triggers, this suggests a bug as the invariant should already be validated in the ctr. throw DruidException.defensive( - "Found unassignedServerPriorities[%s] of size[%d] < total replicas[%d] for taskGroupId[%d]", - unassignedServerPriorities, unassignedServerPriorities.size(), replicas, group.groupId + "Found unassignedServerPriorities[%s] of size[%d] < total replicas[%d] for taskGroupId[%d]. Task server priorities[%s] have already been assigned to tasks[%s].", + unassignedServerPriorities, unassignedServerPriorities.size(), replicas, group.groupId, assignedPriorities, group.taskIds() ); } return unassignedServerPriorities; diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorIOConfig.java b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorIOConfig.java index 1eb6b8661f7..b7ddeeca183 100644 --- a/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorIOConfig.java +++ b/indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorIOConfig.java @@ -126,7 +126,8 @@ public abstract class SeekableStreamSupervisorIOConfig final int replicaCount = this.serverPriorityToReplicas.values().stream().mapToInt(Integer::intValue).sum(); if (replicas != null && replicas != replicaCount) { throw InvalidInput.exception( - "Configured replicas[%d] != sum of replicas[%d] specified in serverPriorityToReplicas[%s].", + "Configured replicas[%d] != sum of replicas[%d] specified in serverPriorityToReplicas[%s]." + + " To avoid ambiguity, consider removing [ioConfig.replicas] in favor of [ioConfig.serverPriorityToReplicas].", replicas, replicaCount, serverPriorityToReplicas ); } diff --git a/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorIOConfigTest.java b/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorIOConfigTest.java index 6d222b8b755..a3a7b1454f4 100644 --- a/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorIOConfigTest.java +++ b/indexing-service/src/test/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorIOConfigTest.java @@ -411,7 +411,8 @@ public class SeekableStreamSupervisorIOConfigTest ), DruidExceptionMatcher.invalidInput().expectMessageIs( StringUtils.format( - "Configured replicas[3] != sum of replicas[5] specified in serverPriorityToReplicas[%s].", + "Configured replicas[3] != sum of replicas[5] specified in serverPriorityToReplicas[%s]." + + " To avoid ambiguity, consider removing [ioConfig.replicas] in favor of [ioConfig.serverPriorityToReplicas].", serverPriorityToReplicas ) ) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
