walterddr commented on code in PR #10166:
URL: https://github.com/apache/pinot/pull/10166#discussion_r1088087214
##########
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:
correction. this seems to be indepenent from the mailbox json format. we
should use the same stringify format similar to the parts in the mailbox json
for string-format here.
can be a follow up next.
--
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]