[SPARK-3106] Fix the race condition issue about Connection and ConnectionManager

Why do you say they are fatal? They're just normal things. Nothing is broken when those exceptions happen, because the code is handling them. The only thing that happens is that ugly messages are printed to the logs.

As Mridul mentioned, I think it's better to handle these situations than to avoid them, because it's pretty tricky to avoid them. The code already seems to handle these exceptions properly, and  your solution to avoiding them altogether may have performance side-effects.

So unless something is actually broken (which I don't think it is), why try to avoid the exceptions in the first place?