Skip to content

[nexus][db] Return 503 when insufficient datasets exist for disk creation #660

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

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

smklein
Copy link
Collaborator

@smklein smklein commented Jan 31, 2022

Fixes #659

@smklein smklein requested a review from davepacheco January 31, 2022 20:10
Copy link
Collaborator

@davepacheco davepacheco left a comment

Choose a reason for hiding this comment

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

There's a disk integration test that I mentioned in #661 that I expect has to be updated for this (regardless of which change lands first).

.map_err(|e| match e {
TxnError::CustomError(
RegionAllocateError::NotEnoughDatasets(_),
) => Error::unavail("Not enough datasets to allocate disks"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

It'd be nice to preserve e's error message here so that we have as much detail as possible in the logs.

@smklein smklein merged commit a205d2f into main Jan 31, 2022
@smklein smklein deleted the disk-unavail-503 branch January 31, 2022 21:21
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.

"Not enough datasets" should be 503, not 500?
3 participants