Skip to content

Inconsistent Bucket Sizing Overflow Behavior on Different Architectures #264

@rossb83

Description

@rossb83

The bucket creating methods such as this one should return an error or panic if the bucket sizes overflow. Overflow behavior is inconsistent between cpu architectures:

For inputs like

tally.ExponentialDurationBuckets(time.Second, 1.3, 90)

x86 -> The last two buckets become equal negatives [..., -2562047h47m16.854775808s, -2562047h47m16.854775808s]
ARM -> The last two buckets are equal positives [..., 2562047h47m16.854775807s, 2562047h47m16.854775807s]

Given customers are already living with this behavior we should be careful about the repair

  • returning an error/panic could cause startup issues where there were none before
  • silently detecting and removing overflows inline could create inconsistent bucket sizes
  • etc..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions