yashmayya commented on code in PR #16202:
URL: https://github.com/apache/pinot/pull/16202#discussion_r2197481318


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTenantRestletResource.java:
##########
@@ -386,23 +394,38 @@ private void 
persistInstancePartitionsHelper(InstancePartitions instancePartitio
     }
   }
 
-  private String getTablesServedFromServerTenant(String tenantName, @Nullable 
String database) {
+  private String getTablesServedFromServerTenant(String tenantName, @Nullable 
String database,
+      boolean withTableProperties) {
     Set<String> tables = new HashSet<>();
+    Set<TenantTableWithProperties> tablePropertiesMap = withTableProperties ? 
new HashSet<>() : null;

Review Comment:
   Actually, I just noticed that you're only ever using the map's values? Why 
not keep it a set in that case?
   
   Edit: if this is to optimize hashing (`String` vs 
`TenantTableWithProperties`), I wouldn't worry too much about it - there aren't 
gonna be duplicate tables and the default native hash code implementation is 
performant enough (also this isn't even a performance sensitive area since it's 
simply a user facing controller REST API).



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to