clintropolis commented on code in PR #18886:
URL: https://github.com/apache/druid/pull/18886#discussion_r2670635559


##########
multi-stage-query/src/main/java/org/apache/druid/msq/dart/controller/sql/DartSqlClientFactoryImpl.java:
##########
@@ -55,10 +55,16 @@ public DartSqlClient makeClient(DruidNode node)
   {
     final ServiceClient client = clientFactory.makeClient(
         StringUtils.format("%s[dart-sql]", node.getHostAndPortToUse()),
-        new 
FixedServiceLocator(ServiceLocation.fromDruidNode(node).withBasePath(SqlResource.PATH)),
+        new FixedServiceLocator(ServiceLocation.fromDruidNode(node)
+                                               
.withBasePath(removeTrailingSlash(SqlResource.PATH))),
         StandardRetryPolicy.noRetries()
     );
 
     return new DartSqlClientImpl(client, jsonMapper);
   }
+
+  private static String removeTrailingSlash(String path)

Review Comment:
   we also have `StringUtils.maybeRemoveTrailingSlash`



##########
multi-stage-query/src/main/java/org/apache/druid/msq/dart/controller/sql/DartQueryMaker.java:
##########
@@ -563,7 +579,8 @@ public void onResultsComplete()
     public void onQueryComplete(MSQTaskReportPayload report)
     {
       try {
-        complete = true;
+        this.complete = true;
+        this.report = report;

Review Comment:
   do the order these are set in matter? I can't see any overlap, but .. didn't 
follow all around everything that is using complete so just wanting to make 
sure nothing will try to get the report after checking completed



##########
multi-stage-query/src/main/java/org/apache/druid/msq/counters/CounterSnapshotsTree.java:
##########
@@ -109,6 +109,31 @@ private void putAll(final Map<Integer, Map<Integer, 
CounterSnapshots>> otherMap)
     }
   }
 
+  @Override
+  public boolean equals(final Object o)
+  {
+    if (this == o) {
+      return true;
+    }
+    if (o == null || getClass() != o.getClass()) {
+      return false;
+    }
+    final CounterSnapshotsTree that = (CounterSnapshotsTree) o;
+    synchronized (snapshotsMap) {
+      synchronized (that.snapshotsMap) {

Review Comment:
   is this deadlocky if multiple things are calling equals? i'm nervous at least



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