Commit 679535f
committed
Add Virtual Shards routing and mapping overrides
This PR adds the initial routing and metadata groundwork for virtual shards.
When enabled, routing now uses a virtual shard id (vShardId) before resolving to a physical shard. This separates hash-space size from physical shard count and prepares the path for future shard movement workflows.
What’s included
- New static index setting: index.number_of_virtual_shards (default -1, disabled).
- Routing update in OperationRouting.generateShardId:
- virtual-shard path when enabled,
- existing behavior unchanged when disabled.
- New VirtualShardRoutingHelper for vShardId -> physical shard resolution.
- Optional per-index override support via virtual_shards_routing custom metadata.
- Test coverage for:
- enabled/disabled routing behavior,
- validation rules,
- override and fallback behavior.
Out of scope
- Side-car segment extraction flow.
- Transport/state-orchestration for managing override lifecycle.1 parent 1f86bd8 commit 679535f
File tree
1 file changed
+10
-0
lines changed- server/src/test/java/org/opensearch/common/settings
1 file changed
+10
-0
lines changedLines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
| |||
0 commit comments