kunal642 commented on a change in pull request #3678: [WIP]: index server 
concurrency fix
URL: https://github.com/apache/carbondata/pull/3678#discussion_r398328095
 
 

 ##########
 File path: 
integration/spark/src/main/scala/org/apache/carbondata/indexserver/DistributedCountRDD.scala
 ##########
 @@ -69,15 +70,17 @@ class DistributedCountRDD(@transient ss: SparkSession, 
dataMapFormat: Distributa
       
DataMapStoreManager.getInstance().clearInvalidSegments(dataMapFormat.getCarbonTable,
         dataMapFormat.getInvalidSegments)
     }
+    val globalQueue = SegmentProcessor.getInstance()
     val futures = if (inputSplits.length <= numOfThreads) {
       inputSplits.map {
-        split => generateFuture(Seq(split))
+        split => generateFuture(Seq(split), globalQueue)
       }
     } else {
       DistributedRDDUtils.groupSplits(inputSplits, numOfThreads).map {
-        splits => generateFuture(splits)
+        splits => generateFuture(splits, globalQueue)
       }
     }
+    globalQueue.emptyQueue()
 
 Review comment:
   This will impact other jobs which might be still using globalQueue

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

Reply via email to