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

Batching statement authorization improvements #1587

Open
ivansenic opened this issue Jan 27, 2022 · 0 comments
Open

Batching statement authorization improvements #1587

ivansenic opened this issue Jan 27, 2022 · 0 comments

Comments

@ivansenic
Copy link
Contributor

ivansenic commented Jan 27, 2022

Currently when using CQL or gRPC APIs and sending batch statements, each statement in that batch is being authorized in StargateQueryHandler. Meaning if I have 100 insert statements that target same table, we would would do 100 authorizations. Depending on the authorization type this can represent significant overhead,

We can optimize this in a way that we collect set of authorizations needed for a batch statement. These should be distinguished by the needed authz scope (depending on the statement type) and target keyspace & table. Once we extract those, we only execute minimal amount of authorizations.

We can also use this ticket to actually create a StatementAuthorizer class and extract the logic from the query handler. Furthermore, we could see how to correctly abstract this so that it can be shared between all persistence modules.

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

No branches or pull requests

1 participant