Starting an query in AsyncMode and then preventing pooling on the connection cancels the async query #1077
Labels
question
Issue is a usage/other question rather than a bug
status-information_needed
Additional information is required from the reporter
status-triage
Issue is under initial triage
We've found that starting an async query and then evicting the connection leads to session, and the queries still running on that session, to be cancelled.
I understand why that makes sense in a synchronous world, but in an async world where someone has deliberately started a query in async mode to leave it running it makes little sense.
Is there a way we can either force a new session to begin on the existing open connection after the async mode is started OR evict the connection from the pool in such a way that it does not stop async queries and it's transactions it has open?
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
What version of .NET driver are you using?
4.2.0
What operating system and processor architecture are you using?
All of Windows x64 / macOS silicon / Linux x64
What version of .NET framework are you using?
dotnet 8.0
What did you do?
`using var conn = await new SnowflakeDbConnection("");
conn.Open();
conn.PreventPooling();
var cmd = conn.CreateSnowflakeDbCommand();
cmd.CommandText = "<async query that takes over 5 minutes>";
var queryId = await cmd.ExecuteAsyncInAsyncMode(default);
Console.WriteLine("QueryID started in async mode: {0}", queryId);`
5 minutes after running the above the query will be cancelled.
The query should continue to execute until completion.
The text was updated successfully, but these errors were encountered: