jtuglu-netflix commented on code in PR #18082:
URL: https://github.com/apache/druid/pull/18082#discussion_r2147271388
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentTransactionalInsertAction.java:
##########
@@ -122,7 +130,15 @@ private SegmentTransactionalInsertAction(
this.startMetadata = startMetadata;
this.endMetadata = endMetadata;
this.dataSource = dataSource;
+ this.supervisorId = supervisorId;
this.segmentSchemaMapping = segmentSchemaMapping;
+
+ if ((startMetadata == null && endMetadata != null)
+ || (startMetadata != null && endMetadata == null)) {
+ throw InvalidInput.exception("startMetadata and endMetadata must either
be both null or both non-null.");
+ } else if (startMetadata != null && supervisorId == null) {
Review Comment:
This isn't a concern here, since we will already fall back to `dataSource`
during assignment, which should be passed in rolling upgrades if the start/end
metadata is also passed. If there is no `dataSource`, then we should be
throwing this error (since it will error out anyways further down the stack).
We don't want to assert `supervisorId` should be non-null during assignment,
since it can be null in cases like
[this](https://github.com/apache/druid/blob/-/indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentTransactionalInsertAction.java#L79).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]