diff --git a/src/mito/src/engine.rs b/src/mito/src/engine.rs index 078b1e98cd..8e8a19656f 100644 --- a/src/mito/src/engine.rs +++ b/src/mito/src/engine.rs @@ -450,15 +450,7 @@ impl MitoEngineInner { table_id, table_info ); - for target_region in &request.region_numbers { - if !table_info.meta.region_numbers.contains(target_region) { - table_error::RegionNotFoundSnafu { - table: table_ref.to_string(), - region: *target_region, - } - .fail()? - } - } + // FIXME: We cannot trust the region numbers in the manifest because other datanodes might overwrite the manifest. let mut regions = HashMap::with_capacity(table_info.meta.region_numbers.len()); diff --git a/src/mito/src/engine/tests.rs b/src/mito/src/engine/tests.rs index 72bdf0ccda..c29a1bd58c 100644 --- a/src/mito/src/engine/tests.rs +++ b/src/mito/src/engine/tests.rs @@ -460,7 +460,7 @@ async fn test_open_table_with_region_number() { .err() .unwrap(); - assert_eq!(region_not_found.to_string(), "Failed to operate table, source: Cannot find region, table: greptime.public.demo, region: 1"); + assert_eq!(region_not_found.to_string(), "Failed to operate table, source: Failed to operate table, source: Cannot find region, table: greptime.public.demo, region: 1"); let reopened = table_engine .open_table(&ctx, open_req.clone())