mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-24 14:38:45 +00:00
bug5787: started with a TODO / FIXME comment
This commit is contained in:
+6
-5
@@ -107,13 +107,14 @@ public interface ApplicationLoadBalancer<ShardingKey> extends Named {
|
||||
Iterable<Rule> addRulesAssigningUnusedPriorities(boolean forceContiguous, Rule... rules);
|
||||
|
||||
/**
|
||||
* For inserting e.g. Shard at a specific priority, we must ensure that the priority is unique in the ruleset.
|
||||
* This function shifts every priority starting at the highest priority one higher for making the priority at {@code index}
|
||||
* free.
|
||||
* For inserting e.g. Shard at a specific priority, we must ensure that the priority is unique in the ruleset. This
|
||||
* function shifts every priority starting at the highest priority one higher for making the priority at
|
||||
* {@code index} free.
|
||||
*
|
||||
* @param index
|
||||
* index supposed to be free
|
||||
* index supposed to be free
|
||||
* @throws IllegalStateException
|
||||
* gets thrown if shifting exceeds the limit of priorities
|
||||
* gets thrown if shifting exceeds the limit of priorities
|
||||
*/
|
||||
void shiftRulesToMakeSpaceAt(int index) throws IllegalStateException;
|
||||
|
||||
|
||||
+1
@@ -304,6 +304,7 @@ implements ApplicationLoadBalancer<ShardingKey> {
|
||||
return Util.stream(getRules()).filter(r->isDefaultRedirectRule(r, hostname)).findAny()
|
||||
.map(defaultRedirectRule->updateDefaultRedirectRule(defaultRedirectRule.ruleArn(), hostname, pathWithLeadingSlash, query))
|
||||
.orElseGet(()->{
|
||||
// FIXME bug 5787: this rule would then typically end up at the end of the rule set, being superseded by all other rules for the replica set; use shiftRulesToMakeSpaceAt with the first rule priority of the replica set identified by hostname
|
||||
final Rule defaultRedirectRule = createDefaultRedirectRule(hostname, pathWithLeadingSlash, query);
|
||||
addRulesAssigningUnusedPriorities(/* forceContiguous */ false, defaultRedirectRule);
|
||||
return defaultRedirectRule;
|
||||
|
||||
Reference in New Issue
Block a user