Skip to content

[FEATURE] High-resolution fractional bucketing in flagd provider #1738

@toddbaert

Description

@toddbaert

Sub-issue of open-feature/flagd#1903. See the parent issue and ADR for full details.

Replace the current 100-bucket float-based fractional bucketing with integer arithmetic using MaxInt32 (2,147,483,647) as the max weight sum:

bucket = (uint64(hashValue) * uint64(totalWeight)) >> 32

Weights must be integers and sum to at most MaxInt32. Java: convert hash to unsigned via hash & 0xFFFFFFFFL, use long for multiply, >>> 32 (unsigned shift).

This is a behavioral breaking change (bucket assignments will shift), but the API surface is unchanged.

⚠️ Dependency: complete the nested fractional evaluation feature first: #1737

@toddbaert will coordinate the release across providers.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Pending

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions