Skip to content

Problem on 32-bit archs #465

@jas4711

Description

@jas4711

Hi! I help package this for Debian, and we build on several architectures. There is a self-check error on 32-bit platforms, see:

https://salsa.debian.org/jas/golang-github-dgraph-io-ristretto/-/jobs/8028424

In particular:

src/github.com/dgraph-io/ristretto/sketch_test.go:67:8: cannot use 12 << 30 (untyped int constant 12884901888) as int value in assignment (overflows)
src/github.com/dgraph-io/ristretto/store_test.go:209:23: cannot use 4340958203495 (untyped int constant) as int value in argument to z.KeyToHash (overflows)

Two ways to fix this: 1) use other values lower than 2^31 if the number itself isn't critical, or 2) store the constant in a int64 type. What do you think?

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