Skip to content

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

@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. C#/.NET: use uint hash, (ulong) for multiply, >> 32 for 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: #607

@toddbaert will coordinate the release across providers.

Metadata

Metadata

Assignees

No one assigned

    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