so I was kinda curious how you'll solve this.
Currently it's best-effort. As the article you linked in one of your previous comments said, there is no good way to predict if the query will complete synchronously, so we instead detect the condition ex-post and take the memory leak. We will also practively avoid async path for names we are sure will be resolved synchronously (currently "localhost" only, but we can add more in the future) to mittigate the most common case that would otherwise leak.
I plan to follow-up with the Windows team to see if there a more specific criteria we can use for that.
Originally posted by @rzikm in #129845 (comment)
Currently it's best-effort. As the article you linked in one of your previous comments said, there is no good way to predict if the query will complete synchronously, so we instead detect the condition ex-post and take the memory leak. We will also practively avoid async path for names we are sure will be resolved synchronously (currently "localhost" only, but we can add more in the future) to mittigate the most common case that would otherwise leak.
I plan to follow-up with the Windows team to see if there a more specific criteria we can use for that.
Originally posted by @rzikm in #129845 (comment)