egor-ryashin commented on a change in pull request #6370: Introduce SegmentId 
class
URL: https://github.com/apache/incubator-druid/pull/6370#discussion_r224049197
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/metadata/SQLMetadataSegmentManager.java
 ##########
 @@ -436,117 +466,94 @@ public ImmutableDruidDataSource 
getInventoryValue(String key)
   @Override
   public void poll()
   {
-    try {
-      ConcurrentHashMap<String, DruidDataSource> newDataSources = new 
ConcurrentHashMap<>();
-
-      log.debug("Starting polling of segment table");
+    synchronized (pollLock) {
 
 Review comment:
   I don't see why we need an additional lock here, we change `startOrder` 
under `writeLock`, so at least on of the competing threads will have a local 
`startOrder` different while checking `startOrder == currentStartOrder` before 
calling `poll()`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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