Skip to content

Add additional forced CRDB index in special case of no object IDs #2385

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

Merged
merged 1 commit into from
May 8, 2025

Conversation

josephschorr
Copy link
Member

@josephschorr josephschorr commented May 8, 2025

Before this change, the non-ID index would never be selected by read or delete relationships in CRDB. Now, it is used for the single, special case

@josephschorr josephschorr requested a review from a team as a code owner May 8, 2025 03:00
@github-actions github-actions bot added area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels May 8, 2025
Copy link
Contributor

@vroldanbet vroldanbet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please add a description to the body on the index that was being selected, and the ones that should be selected instead

filter.OptionalResourceRelation != "" &&
len(filter.OptionalSubjectsSelectors) == 1 &&
filter.OptionalSubjectsSelectors[0].OptionalSubjectType != "" &&
filter.OptionalSubjectsSelectors[0].RelationFilter.NonEllipsisRelation != "" &&
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a blocker, just an idea: I wish we could turn this into some fluent API helper

@josephschorr josephschorr added this pull request to the merge queue May 8, 2025
Merged via the queue into authzed:main with commit 3b6a82d May 8, 2025
41 checks passed
@josephschorr josephschorr deleted the additional-crdb-index branch May 8, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/datastore Affects the storage system area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants