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

Add Experimental Relationship Counter API #1901

Merged
merged 13 commits into from
May 23, 2024

Conversation

josephschorr
Copy link
Member

See #1860

@github-actions github-actions bot added area/api v1 Affects the v1 API area/datastore Affects the storage system area/dependencies Affects dependencies area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) labels May 14, 2024
@josephschorr josephschorr marked this pull request as ready for review May 14, 2024 20:37
@josephschorr josephschorr requested review from vroldanbet and a team as code owners May 14, 2024 20:37
@josephschorr josephschorr removed the request for review from vroldanbet May 14, 2024 20:37
}

func (r *pgReader) LookupCounters(ctx context.Context) ([]datastore.RelationshipCounter, error) {
return r.lookupCounters(ctx, "")
Copy link
Contributor

Choose a reason for hiding this comment

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

how about a constant for the ""?

}

snapshotReader := ds.SnapshotReader(headRev)
count, err := snapshotReader.CountRelationships(ctx, req.Name)
Copy link
Contributor

Choose a reason for hiding this comment

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

so we never store the count or read the stored count?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not currently; its designed so we can layer the counting service on top as the followup

@github-actions github-actions bot added area/CLI Affects the command line area/dispatch Affects dispatching of requests area/api http Affects the HTTP Gateway API labels May 22, 2024
@josephschorr
Copy link
Member Author

Updated

@josephschorr josephschorr added this pull request to the merge queue May 23, 2024
Merged via the queue into authzed:main with commit e255b56 May 23, 2024
22 checks passed
@josephschorr josephschorr deleted the relationship-counter branch May 23, 2024 15:13
@github-actions github-actions bot locked and limited conversation to collaborators May 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/api http Affects the HTTP Gateway API area/api v1 Affects the v1 API area/CLI Affects the command line area/datastore Affects the storage system area/dependencies Affects dependencies area/dispatch Affects dispatching of requests 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