Minimal coord-to-shard mapping. `shard = (tile_x % num_shards)` where `tile_x = coord_x / tile_extent`. Real routing in Phase I uses `nodedb_cluster::vshard_for_array_coord`.
(coord_x: i64, tile_extent: i64, num_shards: u32)
| 35 | /// `shard = (tile_x % num_shards)` where `tile_x = coord_x / tile_extent`. |
| 36 | /// Real routing in Phase I uses `nodedb_cluster::vshard_for_array_coord`. |
| 37 | fn shard_id(coord_x: i64, tile_extent: i64, num_shards: u32) -> u32 { |
| 38 | let tile = coord_x / tile_extent; |
| 39 | (tile.unsigned_abs() % num_shards as u64) as u32 |
| 40 | } |
| 41 | |
| 42 | fn put_op(array: &str, coord_x: i64, ms: u64) -> ArrayOp { |
| 43 | ArrayOp { |
no outgoing calls
no test coverage detected