mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-03 20:02:54 +00:00
fix: partition region id (#3414)
This commit is contained in:
@@ -235,8 +235,12 @@ fn create_partitions_from_region_routes(
|
||||
})?;
|
||||
let partition_def = PartitionDef::try_from(partition)?;
|
||||
|
||||
// The region routes belong to the physical table but are shared among all logical tables.
|
||||
// That it to say, the region id points to the physical table, so we need to use the actual
|
||||
// table id (which may be a logical table) to renew the region id.
|
||||
let id = RegionId::new(table_id, r.region.id.region_number());
|
||||
partitions.push(PartitionInfo {
|
||||
id: r.region.id,
|
||||
id,
|
||||
partition: partition_def,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user