-
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
Foreign key references to hash sharded primary key fail #69192
Comments
Hello, I am Blathers. I am here to help you get the issue triaged. Hoot - a bug! Though bugs are the bane of my existence, rest assured the wretched thing will get the best of care here. I have CC'd a few people who may be able to assist you:
If we have not gotten back to your issue within a few business days, you can try the following:
🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan. |
Fixes cockroachdb#69192 Referencing table does not know about the shard column. So need to ignore it when looking for a valid unique constraint. Release note (bug fix): Foreign key referencing hash sharded key won't fail anymore.
Fixes cockroachdb#69192 Referencing table does not know about the shard column. So need to ignore it when looking for a valid unique constraint. Release note (bug fix): Foreign key referencing hash sharded key won't fail anymore.
73882: stmtdiagnostics: add CancelRequest API r=yuzefovich a=yuzefovich This commit adds an API for a stmt diagnostics request to be canceled based on the query fingerprint. Internally, we choose to achieve that by marking the request (if found) as expired because this allows any ongoing query traces to write their bundles. The API is only available once 22.1 migrations have been completed, otherwise it'll error. This commit uses gossip with a separate key to tell other nodes about the cancellation of a request. Fixes: #73863. Informs: #57634. Paired with @lindseyjin to implement this. Release note: None 74140: sql: ignore shard column during unique constraint searching r=chengxiong-ruan a=chengxiong-ruan Fixes #69192 Referencing table does not know about the shard column. So need to ignore it when looking for a valid unique constraint. Release note (bug fix): Foreign key referencing hash sharded key won't fail anymore. Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Chengxiong Ruan <[email protected]>
Fixes cockroachdb#69192 Referencing table does not know about the shard column. So need to ignore it when looking for a valid unique constraint. Release note (bug fix): Foreign key referencing hash sharded key won't fail anymore.
I'm on
Error message: |
Describe the problem
When creating a table containing a foreign key reference to a table with a hash sharded primary key, the operation fails with this error message:
ERROR: there is no unique constraint matching given keys for referenced table ...
To Reproduce
set experimental_enable_hash_sharded_indexes = on;
ERROR: there is no unique constraint matching given keys for referenced table wsb
Expected behavior
The expectation is that this would yield the two tables with the foreign key reference constraint connecting them.
Additional data / screenshots
Environment:
Epic: CRDB-7363
The text was updated successfully, but these errors were encountered: