Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
Fix builds in 32-bit systems
Browse files Browse the repository at this point in the history
Ensure that MaxUINT32 is stored as uint32 to avoid trying to store it in
a 32-bit int, that overflows.
  • Loading branch information
jsoriano committed Oct 7, 2020
1 parent d5a25b8 commit 8b82801
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion value.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import (

// maxVlogFileSize is the maximum size of the vlog file which can be created. Vlog Offset is of
// uint32, so limiting at max uint32.
var maxVlogFileSize = math.MaxUint32
var maxVlogFileSize uint32 = math.MaxUint32

// Values have their first byte being byteData or byteDelete. This helps us distinguish between
// a key that has never been seen and a key that has been explicitly deleted.
Expand Down

0 comments on commit 8b82801

Please sign in to comment.