kfaraz commented on code in PR #12727:
URL: https://github.com/apache/druid/pull/12727#discussion_r911621600


##########
integration-tests/src/test/java/org/apache/druid/tests/query/ITBroadcastJoinQueryTest.java:
##########
@@ -127,9 +130,22 @@ public void testBroadcastJoin() throws Exception
           
replaceJoinTemplate(getResourceAsString(BROADCAST_JOIN_QUERIES_RESOURCE), 
BROADCAST_JOIN_DATASOURCE)
       );
     }
+
     finally {
       closer.close();
 
+      coordinator.unloadSegmentsForDataSource(BROADCAST_JOIN_DATASOURCE);

Review Comment:
   As you mention in the description, these changes are probably not needed.
   The closer.close() would have already internally called 
`coordinator.unloadSegmentsForDataSource()` and kept retrying until it succeeds 
at `AbstractIndexerTest.unloadAndKillData()`.
   
   I think these changes would just add an extra retry.



##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/DruidSchema.java:
##########
@@ -402,6 +403,11 @@ void refresh(final Set<SegmentId> segmentsToRefresh, final 
Set<String> dataSourc
     // Rebuild the dataSources.
     for (String dataSource : dataSourcesToRebuild) {
       final DruidTable druidTable = buildDruidTable(dataSource);
+      if (druidTable == null) {

Review Comment:
   Should we add a unit test around this that verifies the cleanup of a stale 
table?



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