Skip to content
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

perf!: FindLatestAuthorizationModelID changes to FindLatestAuthorizationModel #1387

Merged
merged 13 commits into from
Feb 26, 2024

Conversation

adriantam
Copy link
Member

@adriantam adriantam commented Feb 23, 2024

Description

Change storage interface FindLatestAuthorizationModelID to FindLatestAuthorizationModel, this allows optimization for type system resolver if model ID is not specified by requiring single DB lookup instead of two.

Note that the interface for storage AuthorizationModelReadBackend is modified.

References

Close #1386

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

…ionModel

Change storage interface FindLatestAuthorizationModelID to FindLatestAuthorizationModel,
this allows optimization for type system resolver if model ID is not specified by requiring
single DB lookup instead of two.

Close #1386
@adriantam adriantam requested a review from a team as a code owner February 23, 2024 17:06
pkg/storage/mysql/mysql.go Outdated Show resolved Hide resolved
pkg/storage/storagewrappers/caching.go Outdated Show resolved Hide resolved
pkg/storage/storagewrappers/caching_test.go Show resolved Hide resolved
adriantam and others added 2 commits February 26, 2024 09:31
Co-authored-by: Maria Ines Parnisari <maria.inesparnisari@okta.com>
miparnisari
miparnisari previously approved these changes Feb 26, 2024
jon-whit
jon-whit previously approved these changes Feb 26, 2024
@adriantam adriantam dismissed stale reviews from jon-whit and miparnisari via 5fbba81 February 26, 2024 23:55
@adriantam adriantam merged commit 3fef489 into main Feb 26, 2024
11 of 13 checks passed
@adriantam adriantam deleted the perf/find_latest_auth_model branch February 26, 2024 23:59
adriantam added a commit that referenced this pull request Feb 29, 2024
…dels

As follow up on #1387, we want to
also test the cases where 3 authorization models are written for the same
store.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suboptimal performance if model ID is not specified in Check and ListObjects APIs
3 participants