You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "aho135 (via GitHub)" <gi...@apache.org> on 2026/05/01 17:05:37 UTC

Re: [PR] feat: Bounded Stream Supervisor (druid)

aho135 commented on code in PR #19372:
URL: https://github.com/apache/druid/pull/19372#discussion_r3174231540


##########
indexing-service/src/main/java/org/apache/druid/indexing/seekablestream/supervisor/SeekableStreamSupervisorSpec.java:
##########
@@ -259,6 +262,42 @@ public void validateSpecUpdateTo(SupervisorSpec proposedSpec) throws DruidExcept
     if (!this.getSource().equals(other.getSource())) {
       throw InvalidInput.exception(ILLEGAL_INPUT_SOURCE_UPDATE_ERROR_MESSAGE, this.getSource(), other.getSource());
     }
+
+    // Validate bounded stream configuration
+    validateBoundedStreamConfig(other);
+  }
+
+  /**
+   * Validates bounded stream configuration for the supervisor spec.
+   *
+   * @param spec the supervisor spec to validate
+   * @throws DruidException if the bounded stream configuration is invalid
+   */
+  protected void validateBoundedStreamConfig(SeekableStreamSupervisorSpec spec) throws DruidException
+  {
+    SeekableStreamSupervisorIOConfig ioConfig = spec.getIoConfig();
+
+    if (ioConfig.isBounded()) {
+      // Validate partition consistency
+      BoundedStreamConfig boundedConfig = ioConfig.getBoundedStreamConfig();
+      if (!boundedConfig.getStartSequenceNumbers().keySet().equals(boundedConfig.getEndSequenceNumbers().keySet())) {
+        throw InvalidInput.exception(
+            "Bounded stream config has mismatched partitions. Start: %s, End: %s",
+            boundedConfig.getStartSequenceNumbers().keySet(),
+            boundedConfig.getEndSequenceNumbers().keySet()
+        );
+      }

Review Comment:
   I went ahead and removed this, along with the logging since these were largely the same validation checks that already run within BoundedStreamConfig



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org