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

Optimize revokeSalted by not calling view.List twice #4465

Merged
merged 6 commits into from
May 18, 2018

Conversation

calvn
Copy link
Contributor

@calvn calvn commented Apr 26, 2018

This PR reduces the number of calls to the storage backend by half whenever revokeSalted is invoked by not calling view.List twice, once within revokeSalted and then within view.ClearView. Since these entries are not deeply nested, we can simply call view.Delete on the secondary index entries as we are iterating through the children the first time around.

@calvn calvn added this to the 0.10.2 milestone Apr 26, 2018
@calvn calvn requested a review from jefferai April 26, 2018 17:23
briankassouf
briankassouf previously approved these changes Apr 26, 2018
briankassouf
briankassouf previously approved these changes Apr 26, 2018
Copy link
Contributor

@briankassouf briankassouf left a comment

Choose a reason for hiding this comment

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

Awesome!

jefferai
jefferai previously approved these changes Apr 26, 2018
@calvn calvn dismissed stale reviews from jefferai and briankassouf via eb1e55c May 10, 2018 20:30
@calvn calvn merged commit a9daf49 into master May 18, 2018
@calvn calvn deleted the ts-revoke-salted-opt branch May 18, 2018 19:14
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.

3 participants