mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-15 20:40:39 +00:00
fix: remove region number validation (#1593)
* fix: remove region number validation * Update src/mito/src/engine.rs Co-authored-by: dennis zhuang <killme2008@gmail.com> --------- Co-authored-by: dennis zhuang <killme2008@gmail.com>
This commit is contained in:
@@ -450,15 +450,7 @@ impl<S: StorageEngine> MitoEngineInner<S> {
|
||||
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());
|
||||
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user