-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SNOW-995562: Repeated queries using requestId - apparently divergent behavior b/t CREATE TABLE
& INSERT
?
#740
Comments
CREATE TABLE
& INSERT ROWS
?CREATE TABLE
& INSERT ROWS
?
CREATE TABLE
& INSERT ROWS
?CREATE TABLE
& INSERT
?
hi - thank you for submitting this issue. we'll take a look. |
🎉 Happy new year ;) and thank you for your patience here. Took a look into this. Appreciate sharing the reproduction code; it is always very helpful to be able to see what the issue reporter is doing. Before going into the bug territory, i would like to confirm what exactly the unexpected behaviour here.
The main use-case for this functionality is to be able to resubmit requests, in case they failed to reach the backend in the first place. So per the above documentation, behaviour could be said it's expected. This is exactly what happens. The query is indeed resubmitted from the original command (and fails because the original command executed successfully). On the server side, the However comparing it with the SQL REST API behaviour which is referenced from the Node.js driver documentation, it says
Tested this and with the SQL REST API, it works the same even with the
same queryID (= statementHandle) as from the first query, meaning, it wasn't executed again but instead result from first query was returned. Bottom line: the driver works per documentation, still divergent from other client. We'll take a look to see if it's a genuine bug or how the driver is indeed expected to work (documentation suggests so). In the meantime as a workaround, using |
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
What version of NodeJS driver are you using?
1.9.2
What operating system and processor architecture are you using?
macOS / arm64
What version of NodeJS are you using?
(
node --version
andnpm --version
)node
18.11.0
/ npm8.19.2
What are the component versions in the environment (
npm list
)?'[email protected]
5.Server version:* E.g. 1.90.1
You may get the server version by running a query:
7.44.2
I've been seeing some unexpected behavior on queries with a shared
requestId
in my app environment, reproduced in plain JS here. Apologies for the lengthy code, as part of what I'm encountering is unexpectedly divergent behavior between these 2 examples.For 2 repeated instances of a given query sharing the same
requestId
, I expected to see an indication that the second instance of the query was not being executed. More to the point, though, I expected to see consistent behavior across these two examples, but this doesn't seem to be the case.The results I see from
createTableExample
above indicate that theCREATE TABLE
query is being run both times despite the presence of a sharedrequestId
. (Second query run yields[OperationFailedError]: SQL compilation error: Object <object> already exists
).By contrast, the
insertRowExample
results show the behavior I'd expect, a row only being inserted on the first query (I tested this more thoroughly but kept the example code here brief).Can you set logging to DEBUG and collect the logs?
https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors
e.g
Add this to get standard output.
The text was updated successfully, but these errors were encountered: