Skip to content

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

Merged
smklein merged 2 commits into
mainfrom
disk-unavail-503
Jan 31, 2022
Merged

[nexus][db] Return 503 when insufficient datasets exist for disk creation#660
smklein merged 2 commits into
mainfrom
disk-unavail-503

Conversation

@smklein

@smklein smklein commented Jan 31, 2022

Copy link
Copy Markdown
Collaborator

Fixes #659

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

@davepacheco davepacheco left a comment

Copy link
Copy Markdown
Collaborator

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).

Comment thread nexus/src/db/datastore.rs
.map_err(|e| match e {
TxnError::CustomError(
RegionAllocateError::NotEnoughDatasets(_),
) => Error::unavail("Not enough datasets to allocate disks"),

Copy link
Copy Markdown
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