Compute the vShard ID for an array op at the given coordinate. The shard key is `array_name_bytes || tile_id.to_le_bytes()`, hashed via `vshard_from_key`. Falls back to `array_vshard_for_name(array_name)` when: - `coord` / `tile_extents` are empty or mismatched. - Any `tile_extents[i]` is zero. Returns a raw `u16` in `0..1023`. Callers wrap it in `VShardId::new(…)`.
(array_name: &str, coord: &[u64], tile_extents: &[u64])
| 122 | /// |
| 123 | /// Returns a raw `u16` in `0..1023`. Callers wrap it in `VShardId::new(…)`. |
| 124 | pub fn vshard_for_array_coord(array_name: &str, coord: &[u64], tile_extents: &[u64]) -> u32 { |
| 125 | match tile_id_of_coord(coord, tile_extents) { |
| 126 | Some(tile_id) => vshard_for_array_tile(array_name, tile_id), |
| 127 | None => array_vshard_for_name(array_name), |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | /// Compute the vShard ID for an array tile by tile identifier. |
| 132 | /// |