-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: cannot perform schema change in transaction after write #54477
Comments
Hi @ajwerner, I've guessed the C-ategory of your issue and suitably labeled it. Please re-label if inaccurate. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
It appears that even an unrelated schema change is handled in the same way? For example
|
Yes, no schema change against at all, regardless of what is being changed, may occur after any write in a transaction. |
I made the following updates to the pgjdbc blocklists: - Removed tests which are now passing due to user-defined schema support. - Removed testUpdateSelectOnly since we now support this syntax as a no-op. - Updated some failure reasons to "unknown" for tests which are still failing even though the referenced issue was closed. - Added many BatchExecuteTest.* tests to the ignore list. These tests are flaky due to a combination of cockroachdb#54477 and the fact that the tests do not run in a deterministic order. Fixes cockroachdb#53467 Fixes cockroachdb#53738 Fixes cockroachdb#54106 Release note: None
I made the following updates to the pgjdbc blocklists: - Removed tests which are now passing due to user-defined schema support. - Removed testUpdateSelectOnly since we now support this syntax as a no-op. - Updated some failure reasons to "unknown" for tests which are still failing even though the referenced issue was closed. - Added many BatchExecuteTest.* tests to the ignore list. These tests are flaky due to a combination of cockroachdb#54477 and the fact that the tests do not run in a deterministic order. - Removed lists for versions earlier than v19.2. Fixes cockroachdb#53467 Fixes cockroachdb#53738 Fixes cockroachdb#54106 Release note: None
I made the following updates to the pgjdbc blocklists: - Removed tests which are now passing due to user-defined schema support. - Removed testUpdateSelectOnly since we now support this syntax as a no-op. - Updated some failure reasons to "unknown" for tests which are still failing even though the referenced issue was closed. - Added many BatchExecuteTest.* tests to the ignore list. These tests are flaky due to a combination of cockroachdb#54477 and the fact that the tests do not run in a deterministic order. - Removed lists for versions earlier than v19.2. Fixes cockroachdb#53467 Fixes cockroachdb#53738 Fixes cockroachdb#54106 Release note: None
I made the following updates to the pgjdbc blocklists: - Removed tests which are now passing due to user-defined schema support. - Removed testUpdateSelectOnly since we now support this syntax as a no-op. - Updated some failure reasons to "unknown" for tests which are still failing even though the referenced issue was closed. - Added many BatchExecuteTest.* tests to the ignore list. These tests are flaky due to a combination of cockroachdb#54477 and the fact that the tests do not run in a deterministic order. - Removed lists for versions earlier than v19.2. Fixes cockroachdb#53467 Fixes cockroachdb#53738 Fixes cockroachdb#54106 Release note: None
57075: colexec,bazel: re-work code-gen through bazel r=irfansharif a=irfansharif Now that we've added a way to source a specific template file in `execgen` (instead of relying on hard-coded paths, see #56982), we can simplify how we generate eg.go files. This lets us parallelize the generation of these files, as the more fine-grained dependency tracking lets bazel generate each eg.go file concurrently (previously we had to specify the superset of all template files as dependencies for the generation of each individual eg.go file). There's one exception for the generation of like_ops.eg.go, the generation of which appears to want read from a second template file. We've special-cased the generation of this file into it's own thing. Release note: None 57081: roachtest: update pgjdbc blocklists r=solongordon a=solongordon I made the following updates to the pgjdbc blocklists: - Removed tests which are now passing due to user-defined schema support. - Removed testUpdateSelectOnly since we now support this syntax as a no-op. - Updated some failure reasons to "unknown" for tests which are still failing even though the referenced issue was closed. - Added many BatchExecuteTest.* tests to the ignore list. These tests are flaky due to a combination of #54477 and the fact that the tests do not run in a deterministic order. Fixes #53467 Fixes #53738 Fixes #54106 Release note: None Co-authored-by: irfan sharif <[email protected]> Co-authored-by: Solon Gordon <[email protected]>
This also affects |
Describe the problem
Somewhat surprisingly, this long-standing issue has not been represented on its own but rather has been lumped into #26508. Cockroach today broadcasts information about changes to descriptors, zone configs, cluster settings, and tenants via a special commit trigger on the
SystemConfigSpan
. This trigger, set by callingSetSystemConfigTrigger
necessitates that the transaction's key be a special key (the start of theSystemConfigSpan
). TheEndTransaction
request then ensures that the trigger is run at application time. The trigger scans the entire span and publishes it to gossip. This gossip used to be used for three purposes but is now used for just two.The downside of this architecture is that one cannot change a transactions key. A transaction's key is set upon the first write. This leads to the below limitation that is surprising and a problem for compatibility.
Expected behavior
Ideally we'd support arbitrary mixes of statements in transactions.
Proposed solution
There are two classes of solution as far as I'm concerned:
Rework the zone-configuration and cluster setting infrastructure
In this set of solution I'd like to see us move away from the monolithic, gossipped system config. There are a variety of problems with it which will be discussed in a forthcoming RFC. The current setup really does not work in the context of separate tenants.
My ideal solution would involve rangefeeds and would enable reasonably trivial incremental updates to be broadcasted and cached in a coherent way on all nodes.
Rework the trigger to occur at intent resolution time rather than commit time
This approach is almost certainly more focused and pragmatic. There would be some concerns about ensuring that the trigger continues to run in
O(txns)
rather thanO(intents)
. Furthermore there's questions about whether this can be feasibly achieved without a change to the protocol. Perhaps a small change to the protocol would be acceptable.Epic: CRDB-10489
The text was updated successfully, but these errors were encountered: