Description
From a forum discussion, a user reports that if they fire off a lot of async requests at once they end up preparing a large number of times. This indicates that there might be a synchronization problem during prepare if we're preparing multiple times. If the statement is the same it should prepare once and cache.
Since the actual prepare logic is expensive, it might make sense to index into whatever data structure we're using in the .NET client cache with a state that it's preparing, then backoff and retry from multiple callers.
Yes, there is nothing stopping requests on multiple threads from doing the prepare. I suspect if we block on a large amount of callers, waiting for the prepare to complete, then you'll see some timeouts. That is probably the best option here.