-
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
QA: SELECT from view with circular reference crashes node #98999
Comments
Great find. This does not appear to be a |
This change fixes node crashes that could happen due to stack overflow if views were created with circular dependencies. Fixes: cockroachdb#98999 Epic: none Release note (bug fix): If views are created with circular dependencies, CRDB returns the error "infinite recursion detected in rules for relation" instead of crashing the node.
This change fixes node crashes that could happen due to stack overflow if views were created with circular dependencies. It also fixes a few places in the schema changer where there were problems dropping views with circular dependencies. Fixes: cockroachdb#98999 Epic: none Co-authored-by: [email protected] Release note (bug fix): If views are created with circular dependencies, CRDB returns the error "infinite recursion detected in rules for relation" instead of crashing the node.
This would worth a gentle TA or at least let customers know. Maybe not worth a TA because I think it only crash the gateway node and a restart of the node would recover things. |
This change fixes node crashes that could happen due to stack overflow if views were created with circular dependencies. It also fixes a few places in the schema changer where there were problems dropping views with circular dependencies. Fixes: cockroachdb#98999 Epic: none Co-authored-by: [email protected] Release note (bug fix): If views are created with circular dependencies, CRDB returns the error "infinite recursion detected in rules for relation" instead of crashing the node.
Discussed the prospect of a TA with the SQl Queries team, and our conclusion is that we don't need one, since as you say it is recoverable, and since it only manifests with a bad schema design users with circular dependencies would have found them quickly (and can fix the issue by correcting the schema). |
This change fixes node crashes that could happen due to stack overflow if views were created with circular dependencies. It also fixes a few places in the schema changer where there were problems dropping views with circular dependencies. Fixes: cockroachdb#98999 Epic: none Co-authored-by: [email protected] Release note (bug fix): If views are created with circular dependencies, CRDB returns the error "cyclic view dependency for relation" instead of crashing the node. This bug is present since at least 21.1.
This change fixes node crashes that could happen due to stack overflow if views were created with circular dependencies. It also fixes a few places in the schema changer where there were problems dropping views with circular dependencies. Fixes: cockroachdb#98999 Epic: none Co-authored-by: [email protected] Release note (bug fix): If views are created with circular dependencies, CRDB returns the error "cyclic view dependency for relation" instead of crashing the node. This bug is present since at least 21.1.
99174: sql: fix circular dependencies in views r=rharding6373 a=rharding6373 This change fixes node crashes that could happen due to stack overflow if views were created with circular dependencies. Fixes: #98999 Epic: none Co-authored-by: [email protected] Release note (bug fix): If views are created with circular dependencies, CRDB returns the error "cyclic view dependency for relation" instead of crashing the node. This bug is present since at least 21.1. 99624: testutils: add infrastructure for reusable test fixtures r=RaduBerinde a=RaduBerinde Certain storage-related tests/benchmarks generate fixtures and attempt to reuse them across invocations. This is important because fixtures can be large and slow to generate; but more importantly the generation is non-deterministic and we want to use the exact same fixture when comparing benchmark data. Currently the tests achieve this by using a `.gitignore`d subdirectory inside the source tree. This does not work with bazel (which executes the test in a sandbox). This commit addresses the issue by adding new test infrastructure for reusable fixtures. We use the user's `.cache` directory instead of the source tree (specifically $HOME/.cache/crdb-test-fixtures/...). For bazel, we make sure the path is available (and writable) in the sandbox and we pass the path to the test through an env var. Fixes #83599. Release note: None Epic: none 99699: spanconfig: integrate SpanConfigBounds with the Store and KVSubscriber r=ajwerner a=arulajmani This patch integrates `SpanConfigBounds` with the `KVSubscriber` and `spanconfig.Store`. The `spanconfig.Store` used by the `KVSubscriber` now has a handle to the global tenant capability state. It uses this to clamp any secondary tenant span configs that are not in conformance before returning them. By default, clamping of secondary tenant span configurations is turned off. It can be enabled using the `spanconfig.bounds.enabled` cluster setting. The setting is hidden. Fixes: #99689 Informs #99911 Release note: None 99759: roachtest: set lower min range_max_bytes in multitenant_distsql test r=rharding6373 a=rharding6373 The multitenant_distsql roachtest relies on a smaller range size than the new default min of range_max_bytes (64MiB) due to performance and resource limitations. We set the COCKROACH_MIN_RANGE_MAX_BYTES to allow the test to use the smaller range. Fixes: #99626 Epic: None Release note: None 99813: spanconfig: do not fatal in NeedsSplit and ComputeSplitKey r=irfansharif a=arulajmani See individual commits for details. Fixes #97336. 99839: schemachanger: Annotate all tables if ALTER TABLE IF EXISTS on non-existent table r=Xiang-Gu a=Xiang-Gu Previously, if table `t` does not exist, `ALTER TABLE IF EXISTS t` will only mark `t` as non-existent. This is inadequate because for stmt like `ALTER TABLE IF EXISTS t ADD FOREIGN KEY REFERENCES t_other` we will not touch `t_other` and the validation logic will later complain that `t_other` is not fully resolved nor marked as non-existent. This commit fixes it by marking all tables in this ALTER TABLE stmt as non-existent if the `t` is non-existent, so we can pass the validation. Fixes issues discovered in #99185 Epic: None 99865: roachtest: fix query used to get job status in backup/mixed-version r=srosenberg a=renatolabs At the moment, we only query job status in mixed-version state (so we should always use `system.jobs`). However, the code added in this commit should continue to work once we start developing 23.2, as we're checking that the cluster version is at least 23.1 before using `crdb_internal.system_jobs`. Epic: none Release note: None 99878: jobs: change job_info.info_key to string r=dt a=dt Release note: none. Epic: none. Hopefully we get this one in now before it is released and harder to change later. I think if we go with bytes, we'll spend the next several years typing convert_to over and over, or forgetting to and then typing it, when debugging. Co-authored-by: rharding6373 <[email protected]> Co-authored-by: Radu Berinde <[email protected]> Co-authored-by: Arul Ajmani <[email protected]> Co-authored-by: Xiang Gu <[email protected]> Co-authored-by: Renato Costa <[email protected]> Co-authored-by: David Taylor <[email protected]>
This change fixes node crashes that could happen due to stack overflow if views were created with circular dependencies. It also fixes a few places in the schema changer where there were problems dropping views with circular dependencies. Fixes: cockroachdb#98999 Epic: none Co-authored-by: [email protected] Release note (bug fix): If views are created with circular dependencies, CRDB returns the error "cyclic view dependency for relation" instead of crashing the node. This bug is present since at least 21.1. Release justification: Fixes a bug that can cause the gateway node to crash if there are self-referencing views.
This change fixes node crashes that could happen due to stack overflow if views were created with circular dependencies. It also fixes a few places in the schema changer where there were problems dropping views with circular dependencies. Fixes: cockroachdb#98999 Epic: none Co-authored-by: [email protected] Release note (bug fix): If views are created with circular dependencies, CRDB returns the error "cyclic view dependency for relation" instead of crashing the node. This bug is present since at least 21.1. Release justification: Fixes a bug that can cause the gateway node to crash if there are self-referencing views.
This change fixes node crashes that could happen due to stack overflow if views were created with circular dependencies. It also fixes a few places in the schema changer where there were problems dropping views with circular dependencies. Fixes: cockroachdb#98999 Epic: none Co-authored-by: [email protected] Release note (bug fix): If views are created with circular dependencies, CRDB returns the error "cyclic view dependency for relation" instead of crashing the node. This bug is present since at least 21.1. Release justification: Fixes a bug that can cause the gateway node to crash if there are self-referencing views.
From star expressions in view definitions QA,
Creating a view with a circular reference to itself causes a stack overflow and crashes the node:
In Postgres, the above returns an error:
Jira issue: CRDB-25645
The text was updated successfully, but these errors were encountered: