Skip to content

Commit

Permalink
fix: partition region id (#3414)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengjiachun committed Feb 29, 2024
1 parent a500252 commit 3cad9d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/partition/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
});
}
Expand Down

0 comments on commit 3cad9d9

Please sign in to comment.