jon-wei commented on a change in pull request #8287: Cleanup appenderators and 
segment walkers in UnifiedIndexerAppenderatorsManager
URL: https://github.com/apache/incubator-druid/pull/8287#discussion_r314546755
 
 

 ##########
 File path: 
server/src/main/java/org/apache/druid/segment/realtime/appenderator/UnifiedIndexerAppenderatorsManager.java
 ##########
 @@ -134,41 +154,30 @@ public Appenderator createRealtimeAppenderatorForTask(
       CachePopulatorStats cachePopulatorStats
   )
   {
-    SinkQuerySegmentWalker segmentWalker = 
datasourceSegmentWalkers.computeIfAbsent(
-        schema.getDataSource(),
-        (datasource) -> {
-          VersionedIntervalTimeline<String, Sink> sinkTimeline = new 
VersionedIntervalTimeline<>(
-              String.CASE_INSENSITIVE_ORDER
-          );
-          SinkQuerySegmentWalker datasourceSegmentWalker = new 
SinkQuerySegmentWalker(
-              schema.getDataSource(),
-              sinkTimeline,
-              objectMapper,
-              emitter,
-              conglomerate,
-              this.queryExecutorService,
-              Preconditions.checkNotNull(this.cache, "cache"),
-              this.cacheConfig,
-              this.cachePopulatorStats
-          );
-          return datasourceSegmentWalker;
-        }
-    );
+    synchronized (this) {
+      DatasourceBundle datasourceBundle = datasourceBundles.computeIfAbsent(
+          schema.getDataSource(),
+          (datasource) -> {
+            return new DatasourceBundle(datasource);
 
 Review comment:
   Changed to `DatasourceBundle::new`

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to