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

storage code review #1110

Merged
merged 4 commits into from
Oct 13, 2023
Merged

storage code review #1110

merged 4 commits into from
Oct 13, 2023

Conversation

graydon
Copy link
Contributor

@graydon graydon commented Oct 13, 2023

This is the one change I'm fairly confident ought to happen in storage: factoring the get paths into a common funnel. Besides being duplicate code, if you look carefully the previous arrangement had inconsistent handling of None returns from the underlying map too: one path (correctly) treated it as an internal error since prepare_read_only_access shouldn't allow getting there; the other two paths either returned it as-is or merged it into the MissingValue path.

I'm not changing two other error codes just yet, though I was a bit tempted to. Would be interested to hear input from @dmkozh : as mentioned in conversation elsewhere, I think the footprint checking paths should probably return InvalidAction as errors rather than ExceededLimit; and possibly the path in extend that returns an InternalError live-until value should be InvalidAction too. But I can imagine the counterarguments to these, and if you feel strongly that they're correct already I'm ok leaving them as-is.

@graydon graydon requested a review from dmkozh October 13, 2023 04:54
@graydon graydon changed the title factor out duplicate (and slightly wrong) get-paths in storage storage code review Oct 13, 2023
@graydon graydon added this pull request to the merge queue Oct 13, 2023
Merged via the queue into main with commit 5e52da9 Oct 13, 2023
9 checks passed
@graydon graydon deleted the graydon-code-review-8 branch October 13, 2023 17:55
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