swaminathanmanish commented on code in PR #11315:
URL: https://github.com/apache/pinot/pull/11315#discussion_r1290290403


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotHelixTaskResourceManager.java:
##########
@@ -118,25 +117,19 @@ public synchronized Set<String> getTaskTypes() {
    *
    * @param taskType Task type
    */
-  public void ensureTaskQueueExists(String taskType) {
+  public synchronized void ensureTaskQueueExists(String taskType) {
     String helixJobQueueName = getHelixJobQueueName(taskType);
     WorkflowConfig workflowConfig = 
_taskDriver.getWorkflowConfig(helixJobQueueName);
-
     if (workflowConfig == null) {
       // Task queue does not exist
       LOGGER.info("Creating task queue: {} for task type: {}", 
helixJobQueueName, taskType);
 
       // Set full parallelism
       // Don't allow overlap job assignment so that we can control number of 
concurrent tasks per instance
-      JobQueue jobQueue = new JobQueue.Builder(helixJobQueueName)
-          .setWorkflowConfig(new 
WorkflowConfig.Builder().setParallelJobs(Integer.MAX_VALUE).build()).build();
+      JobQueue jobQueue = new 
JobQueue.Builder(helixJobQueueName).setWorkflowConfig(
+          new 
WorkflowConfig.Builder().setParallelJobs(Integer.MAX_VALUE).build()).build();
       _taskDriver.createQueue(jobQueue);
     }
-
-    // Wait until task queue context shows up
-    while (_taskDriver.getWorkflowContext(helixJobQueueName) == null) {

Review Comment:
   Could you provide context on why this was added and why it can be removed 
now ?  Same comment for the other while loop in  submitTask



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to