gianm commented on a change in pull request #8106: fix npe with sql metadata 
manager polling and empty database
URL: https://github.com/apache/incubator-druid/pull/8106#discussion_r305527342
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/metadata/SQLMetadataSegmentManager.java
 ##########
 @@ -967,6 +963,13 @@ public DataSegment map(int index, ResultSet r, 
StatementContext ctx) throws SQLE
     // segment mark calls in rapid succession. So the snapshot update is not 
done outside of database poll at this time.
     // Updates outside of database polls were primarily for the user 
experience, so users would immediately see the
     // effect of a segment mark call reflected in MetadataResource API calls.
+
+    ImmutableMap<String, String> dataSourceProperties = 
createDefaultDataSourceProperties();
+    if (segments.isEmpty()) {
 
 Review comment:
   This part is the fix, right? (Continuing on even if `segments` is empty?)
   
   It looks good to me.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to