mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-29 11:20:38 +00:00
feat: allow initializing regions in background (#2930)
* refactor: open regions in background * feat: add status code of RegionNotReady * feat: use RegionNotReady instead of RegionNotFound for a registering region * chore: apply suggestions from CR * feat: add status code of RegionBusy * feat: return RegionBusy for mutually exclusive operations
This commit is contained in:
@@ -538,8 +538,10 @@ pub fn status_to_tonic_code(status_code: StatusCode) -> Code {
|
||||
| StatusCode::TableColumnNotFound
|
||||
| StatusCode::DatabaseNotFound
|
||||
| StatusCode::UserNotFound => Code::NotFound,
|
||||
StatusCode::StorageUnavailable => Code::Unavailable,
|
||||
StatusCode::RuntimeResourcesExhausted | StatusCode::RateLimited => Code::ResourceExhausted,
|
||||
StatusCode::StorageUnavailable | StatusCode::RegionNotReady => Code::Unavailable,
|
||||
StatusCode::RuntimeResourcesExhausted
|
||||
| StatusCode::RateLimited
|
||||
| StatusCode::RegionBusy => Code::ResourceExhausted,
|
||||
StatusCode::UnsupportedPasswordType
|
||||
| StatusCode::UserPasswordMismatch
|
||||
| StatusCode::AuthHeaderNotFound
|
||||
|
||||
Reference in New Issue
Block a user