MSQ: Wake up the main controller thread on workerError. (#17075)

This isn't necessary when using MSQWorkerTaskLauncher as the WorkerManager
implementation, because in that case, task failure also wakes up the
main thread. However, when using workers that are not task-based, we don't
want to rely on the WorkerManager for this.
This commit is contained in:
Gian Merlino 2024-09-16 05:30:09 -07:00 committed by GitHub
parent 6aad9b08dd
commit 8630974157
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -117,6 +117,7 @@ import org.apache.druid.msq.indexing.error.TooManyBucketsFault;
import org.apache.druid.msq.indexing.error.TooManySegmentsInTimeChunkFault;
import org.apache.druid.msq.indexing.error.TooManyWarningsFault;
import org.apache.druid.msq.indexing.error.UnknownFault;
import org.apache.druid.msq.indexing.error.WorkerFailedFault;
import org.apache.druid.msq.indexing.error.WorkerRpcFailedFault;
import org.apache.druid.msq.indexing.processor.SegmentGeneratorFrameProcessorFactory;
import org.apache.druid.msq.indexing.report.MSQSegmentReport;
@ -754,6 +755,11 @@ public class ControllerImpl implements Controller
}
workerErrorRef.compareAndSet(null, mapQueryColumnNameToOutputColumnName(errorReport));
// Wake up the main controller thread.
addToKernelManipulationQueue(kernel -> {
throw new MSQException(new WorkerFailedFault(errorReport.getTaskId(), null));
});
}
/**