jihoonson commented on a change in pull request #5001:
URL: https://github.com/apache/druid/pull/5001#discussion_r413960180
##########
File path: server/src/main/java/io/druid/metadata/SQLMetadataSegmentManager.java
##########
@@ -144,26 +142,35 @@ public void run()
delay.getMillis(),
TimeUnit.MILLISECONDS
);
- started = true;
+ lifecycleLock.started();
+ }
+ finally {
+ lifecycleLock.exitStart();
}
}
@Override
@LifecycleStop
public void stop()
{
- synchronized (lock) {
- if (!started) {
- return;
- }
+ if (!lifecycleLock.canStop()) {
+ return;
+ }
+ try {
+ final ConcurrentHashMap<String, DruidDataSource> emptyMap = new
ConcurrentHashMap<>();
+ ConcurrentHashMap<String, DruidDataSource> current;
+ do {
+ current = dataSourcesRef.get();
Review comment:
Which for loop are you referring to? Can you link here? Also, there has
been a pretty big refactoring for this class. Do you still see the same issue?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]