You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending a request with multiple schema changes on the SQL over HTTP api, it doesn't actually make all the changes.
To test: create table CREATE TABLE t1 (k INT, i INT, f FLOAT, s STRING);
If I make a request with a single query, such as CREATE INDEX ON t1 (i) STORING (k);, it works.
If I instead create a index (on cli or the api) CREATE INDEX ON t1 (i); (which creates the idx t1_i_idx), and then I make a call to the api passing two statements: CREATE INDEX IF NOT EXISTS t1_i__idx ON t1 (i) STORING (k); DROP INDEX t1@t1_i_idx;
the api return no errors, but checking the table I can see that the t1_i_idx was deleted, but t1_i__idx was not created. If I then try to run the same statement CREATE INDEX IF NOT EXISTS t1_i__idx ON t1 (i) STORING (k); directly on cli, it doesn't return any errors, but also doesn't create the index.
We need to construct the internal executor in the context of the transaction
so that we can make sure that its side-effects are properly managed. Without
this change, we'd be throwing away all of the extraTxnState between each
statement. We'd fail to create the jobs (which we defer to the end of the
transaction), and we'd fail to run those jobs and check for errors. We'd
also fail to validate the two-version invariant or wait for one version.
Fixescockroachdb#86332
Release justification: Fixes critical bugs in new functionality.
Release note: None
We need to construct the internal executor in the context of the transaction
so that we can make sure that its side-effects are properly managed. Without
this change, we'd be throwing away all of the extraTxnState between each
statement. We'd fail to create the jobs (which we defer to the end of the
transaction), and we'd fail to run those jobs and check for errors. We'd
also fail to validate the two-version invariant or wait for one version.
Fixescockroachdb#86332
Release justification: Fixes critical bugs in new functionality.
Release note: None
86433: server: proper transaction state management in sql-over-http r=ajwerner a=ajwerner
First 4 commits are #86427.
Next commit is #86461.
We need to construct the internal executor in the context of the transaction
so that we can make sure that its side-effects are properly managed. Without
this change, we'd be throwing away all of the extraTxnState between each
statement. We'd fail to create the jobs (which we defer to the end of the
transaction), and we'd fail to run those jobs and check for errors. We'd
also fail to validate the two-version invariant or wait for one version.
Fixes#86332
Release justification: Fixes critical bugs in new functionality.
Release note: None
Co-authored-by: Andrew Werner <[email protected]>
When sending a request with multiple schema changes on the SQL over HTTP api, it doesn't actually make all the changes.
To test: create table
CREATE TABLE t1 (k INT, i INT, f FLOAT, s STRING);
If I make a request with a single query, such as
CREATE INDEX ON t1 (i) STORING (k);
, it works.If I instead create a index (on cli or the api)
CREATE INDEX ON t1 (i);
(which creates the idxt1_i_idx
), and then I make a call to the api passing two statements:CREATE INDEX IF NOT EXISTS t1_i__idx ON t1 (i) STORING (k);
DROP INDEX t1@t1_i_idx;
the api return no errors, but checking the table I can see that the
t1_i_idx
was deleted, butt1_i__idx
was not created. If I then try to run the same statementCREATE INDEX IF NOT EXISTS t1_i__idx ON t1 (i) STORING (k);
directly on cli, it doesn't return any errors, but also doesn't create the index.Trying to drop t1 just hangs after that.
Jira issue: CRDB-18702
The text was updated successfully, but these errors were encountered: