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

Disk Buckets: unlock verifies expected #22052

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

jeffwashington
Copy link
Contributor

Problem

Summary of Changes

Fixes #

@jeffwashington jeffwashington marked this pull request as ready for review December 21, 2021 19:24
@jeffwashington jeffwashington force-pushed the metrics59_2 branch 2 times, most recently from e66f564 to 757a50f Compare December 21, 2021 19:51
Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

Will unlock() be called in more places? I'm not sure I see a benefit to moving the assert around because it changes the normal/common API for "unlock" functions.

@jeffwashington
Copy link
Contributor Author

Will unlock() be called in more places? I'm not sure I see a benefit to moving the assert around because it changes the normal/common API for "unlock" functions.

It will likely become a member of a trait. And the concept of Uid will be abstracted to be stored in the data structure of varying # of bits perhaps.

@jeffwashington
Copy link
Contributor Author

Will unlock() be called in more places? I'm not sure I see a benefit to moving the assert around because it changes the normal/common API for "unlock" functions.

It will likely become a member of a trait. And the concept of Uid will be abstracted to be stored in the data structure of varying # of bits perhaps.

So I want a caller to say, "Here's the full id I expect to be there. Please unlock and verify that this id was there." If the full id is only stored as 1 bit or it is stored as 64 bits, the unlock function knows enough to convert the full u64 uid to 1 bit and compare it.

brooksprumo
brooksprumo previously approved these changes Dec 21, 2021
@mergify mergify bot dismissed brooksprumo’s stale review December 21, 2021 21:55

Pull request has been modified.

@jeffwashington jeffwashington merged commit 5b464a3 into solana-labs:master Dec 21, 2021
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.

2 participants