-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Fix Loki arm builds #15936
chore: Fix Loki arm builds #15936
Conversation
ref: https://github.com/grafana/loki/actions/runs/12945628097/job/36109187406 Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
@@ -409,7 +409,8 @@ func (b *bitpackBuffer) Flush(w streamio.Writer) error { | |||
// | |||
// To encode the width in 6 bits, we encode width-1. That reserves the bottom | |||
// 7 bits for metadata, and the remaining 57 bits for the number of sets. | |||
const maxSets = 1<<57 - 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be explicitly typed as const maxSets uint64
so we wouldn't have to decrease the value on 32 bit ARM?
(I'm fine with the other change to remove math.MinInt64)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You compare the value later with a variable s.sets of type int
. We could change that field to uint64
if you want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha sorry, I was reviewing this from my phone 🤦 At my desk now; I think your change is fine, we'll see if anything breaks.
Can you update the doc comment on the bitpackBuffer struct? Right now it still says the max value for bit_packed_sets is 2^57-1.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the field sets
to type uint64
, which seems to be the more appropriate option.
Signed-off-by: Christian Haudum <christian.haudum@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
What this PR does / why we need it:
ref: https://github.com/grafana/loki/actions/runs/12945628097/job/36109187406
Succeeding build job: https://github.com/grafana/loki/actions/runs/12949918527