Describe the bug
When adding the same custom strategy implementation multiple times to a single feature flag (with different parameters), only one of the strategy instances appears to be evaluated effectively.
The observed behavior is that the last-added instance determines the final evaluation result, while earlier instances are ignored.
Note
Only if we upgrade unleash-client-java from 11.1.1 to 11.2.1.
Steps to reproduce the bug
- Implement a custom strategy in Java.
- Add the same custom strategy to a feature flag multiple times.
- Configure different parameters for each instance.
- Evaluate the flag with a context that should match one of the earlier instances.
- Observe that only the last-added strategy instance is effectively applied.
Reordering the strategies changes the outcome.
Expected behavior
Unleash documentation states that:
If a feature flag has multiple activation strategies, the flag is enabled if any strategy evaluates to true.
Therefore, when the same custom strategy is added multiple times to a feature flag:
- Each strategy instance should be evaluated independently.
- Each instance should receive its own parameters.
- The flag should be enabled if any of the strategy instances evaluate to true.
Logs, error output, etc.
Screenshots
No response
Additional context
Technical Context
There is a related commit in yggdrasil-bindings that introduces indexed internal strategy identifiers:
[https://github.com/Unleash/yggdrasil-bindings/commit/f8794cfd072644c500385fbaa769ccca8b702e78](Unleash/yggdrasil-bindings@f8794cf
This appears to address potential result key collisions.
However, stacking the same custom strategy multiple times still results in only one instance being respected during evaluation.
Questions
- Is stacking the same custom strategy multiple times on a single feature flag officially supported?
- If supported, should each instance be evaluated independently?
- If not supported, should this limitation be documented?
Environment
Unleash Server version: Tested on 5.6.9, 6.10.1, 7.4.1
unleash-client-java version: 11.2.1
yggdrasil-engine version: 0.4.4
Java version: 25
Deployment: Docker
Unleash version
6.10.1
Subscription type
Open source
Hosting type
Self-hosted
SDK information (language and version)
unleash-client-java 11.2.0 onwards
Describe the bug
When adding the same custom strategy implementation multiple times to a single feature flag (with different parameters), only one of the strategy instances appears to be evaluated effectively.
The observed behavior is that the last-added instance determines the final evaluation result, while earlier instances are ignored.
Note
Only if we upgrade unleash-client-java from 11.1.1 to 11.2.1.
Steps to reproduce the bug
Reordering the strategies changes the outcome.
Expected behavior
Unleash documentation states that:
Therefore, when the same custom strategy is added multiple times to a feature flag:
Logs, error output, etc.
Screenshots
No response
Additional context
Technical Context
There is a related commit in yggdrasil-bindings that introduces indexed internal strategy identifiers:
[https://github.com/Unleash/yggdrasil-bindings/commit/f8794cfd072644c500385fbaa769ccca8b702e78](Unleash/yggdrasil-bindings@f8794cf
This appears to address potential result key collisions.
However, stacking the same custom strategy multiple times still results in only one instance being respected during evaluation.
Questions
Environment
Unleash Server version: Tested on 5.6.9, 6.10.1, 7.4.1
unleash-client-java version: 11.2.1
yggdrasil-engine version: 0.4.4
Java version: 25
Deployment: Docker
Unleash version
6.10.1
Subscription type
Open source
Hosting type
Self-hosted
SDK information (language and version)
unleash-client-java 11.2.0 onwards