Commit d59d301
committed
refactor(disaggregation): gating skip on ANY strict header, not just [0]
Reviewer flagged the [0] shortcut on filter.go's header-pin check:
Selectors[0] being "the revision axis" is an implicit derivation
(revisionLabelKey = Selectors[0].LabelKey inside newController), not
anything the config surface names. Leaking that convention into the
gating fast path made the code fragile — a config that puts a non-
revision selector first would silently break the check.
Simpler and safer rule: any strict pin from the client means "I've
expressed a constraint, respect it." Skip gating and let the strict
filter do the narrowing. The picker then distributes over what
survives — no stochastic revision guess that could conflict with the
pin and 503.
Bonus: this handles cross-axis edge cases better. If a request pins
`slice=s2` only, and one revision has no s2 pods:
- previous rule: gating fires, weight-picks a revision, strict then
narrows within it — if the picked revision has no s2 pods, 503.
- new rule: gating skips, strict narrows all pods to slice=s2 (the
revision with no s2 pods drops out naturally), picker uniform.
Zero 503.
Rename: hasRevisionHeader → hasStrictHeader (matches the new logic).
Signed-off-by: Mathis Felardos <mathis@mistral.ai>1 parent 391cb75 commit d59d301
1 file changed
Lines changed: 17 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
| |||
173 | 176 | | |
174 | 177 | | |
175 | 178 | | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
192 | 193 | | |
193 | | - | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| |||
0 commit comments