jtuglu-netflix commented on code in PR #18082:
URL: https://github.com/apache/druid/pull/18082#discussion_r2149181862


##########
indexing-service/src/main/java/org/apache/druid/indexing/common/actions/SegmentTransactionalAppendAction.java:
##########
@@ -94,14 +98,24 @@ private SegmentTransactionalAppendAction(
     this.segments = segments;
     this.startMetadata = startMetadata;
     this.endMetadata = endMetadata;
+    this.supervisorId = supervisorId;
 
     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:
   I've added logic above the aforementioned check to account for properly 
assigning the `supervisorId` in case it is received as `null` from an old 
client during a rolling upgrade. I'll summarize that logic here:
   
   I pull the `dataSource` from the segments set, which is what is done later 
in the code anyways. If there are no segments, this is unexpected and will 
[error 
out](https://github.com/apache/druid/blob/-/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java#L1867)
 anyways. If the segments are somehow corrupted and have differing `dataSource` 
values, this will be caught in the same method.



-- 
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]

Reply via email to