Skip to content

Commit

Permalink
remove open-region error
Browse files Browse the repository at this point in the history
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
  • Loading branch information
waynexia committed Jan 3, 2023
1 parent 4a46e09 commit 56a568e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
2 changes: 0 additions & 2 deletions src/mito/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,6 @@ impl<S: StorageEngine> MitoEngineInner<S> {
.open_region(&engine_ctx, &region_name, &opts)
.await
.map_err(BoxedError::new)
.context(error::OpenRegionSnafu { region_name })
.map_err(BoxedError::new)
.context(table_error::TableOperationSnafu)?
{
None => return Ok(None),
Expand Down
9 changes: 1 addition & 8 deletions src/mito/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,6 @@ pub enum Error {
source: BoxedError,
},

#[snafu(display("Failed to open region, region: {}, source: {}", region_name, source))]
OpenRegion {
region_name: String,
#[snafu(backtrace)]
source: BoxedError,
},

#[snafu(display(
"Failed to build table meta for table: {}, source: {}",
table_name,
Expand Down Expand Up @@ -186,7 +179,7 @@ impl ErrorExt for Error {
use Error::*;

match self {
CreateRegion { source, .. } | OpenRegion { source, .. } => source.status_code(),
CreateRegion { source, .. } => source.status_code(),

AlterTable { source, .. } => source.status_code(),

Expand Down

0 comments on commit 56a568e

Please sign in to comment.