agavra commented on code in PR #10166:
URL: https://github.com/apache/pinot/pull/10166#discussion_r1088088064


##########
pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/plan/serde/QueryPlanSerDeUtils.java:
##########
@@ -59,16 +60,26 @@ public static Worker.StagePlan 
serialize(DistributedStagePlan distributedStagePl
         
.putAllStageMetadata(stageMetadataMapToProtoMap(distributedStagePlan.getMetadataMap())).build();
   }
 
+  private static final Pattern VIRTUAL_SERVER_PATTERN = Pattern.compile(
+      
"(?<virtualid>[0-9]+)@(?<host>[^:]+):(?<port>[0-9]+)\\((?<grpc>[0-9]+):(?<service>[0-9]+):(?<mailbox>[0-9]+)\\)");
+
   public static VirtualServer stringToInstance(String serverInstanceString) {
-    String[] s = StringUtils.split(serverInstanceString, '_');
+    Matcher matcher = VIRTUAL_SERVER_PATTERN.matcher(serverInstanceString);
+    if (!matcher.matches()) {
+      throw new IllegalArgumentException("Unexpected serverInstanceString '" + 
serverInstanceString + "'. This might "
+          + "happen if you are upgrading from an old version of the multistage 
engine to the current one in a rolling "
+          + "fashion.");
+    }

Review Comment:
   chatted offline, this is not being deprecated yet - the JSONification was 
for the mailbox ID, this has to be done separately



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