Skip to content

SNOW-1892865: Starting an query in AsyncMode and then evicting the connection pool cancels the async query #1077

@john-skyward-solutions

Description

@john-skyward-solutions

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!

  1. What version of .NET driver are you using?
    4.2.0

  2. What operating system and processor architecture are you using?
    All of Windows x64 / macOS silicon / Linux x64

  3. What version of .NET framework are you using?
    dotnet 8.0

  4. 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.

  1. What did you expect to see?
    The query should continue to execute until completion.

Metadata

Metadata

Labels

backend changes neededChange must be implemented on the Snowflake service, and not in the client driver.enhancementThe issue is a request for improvement or a new featurestatus-blockedProgress cannot be made to this issue due to an outside blocking factor.status-triage_doneInitial triage done, will be further handled by the driver team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions