rmetzger commented on a change in pull request #16483:
URL: https://github.com/apache/flink/pull/16483#discussion_r668962271



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/source/coordinator/SourceCoordinatorProvider.java
##########
@@ -110,18 +115,32 @@ public OperatorCoordinator 
getCoordinator(OperatorCoordinator.Context context) {
 
         @Override
         public synchronized Thread newThread(Runnable r) {
-            if (t != null) {
+            if (t != null && t.isAlive()) {
+                throw new Error(
+                        "Source Coordinator Thread already exists. There 
should never be more than one "
+                                + "thread driving the actions of a Source 
Coordinator. Existing Thread: "
+                                + t);
+            }
+            if (t != null && previousFailureReason != null) {
                 throw new Error(
-                        "This indicates that a fatal error has happened and 
caused the "
-                                + "coordinator executor thread to exit. Check 
the earlier logs"
-                                + "to see the root cause of the problem.");
+                        "The following a fatal error has happened in a 
previously spawned "
+                                + "Source Coordinator thread. No new thread 
can be spawned.",
+                        previousFailureReason);

Review comment:
       ```suggestion
                           "The following fatal error has happened in a 
previously spawned "
                                   + "Source Coordinator thread. No new thread 
can be spawned.",
                           previousFailureReason);
   ```




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


Reply via email to