Skip to content

Commit

Permalink
fix: resolve uint64 type mismatch in remaining entries calculation in…
Browse files Browse the repository at this point in the history
… Compact method
  • Loading branch information
1911860538 committed Feb 15, 2025
1 parent ab3dcca commit 685b9b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func (ms *MemoryStorage) Compact(compactIndex uint64) error {
// NB: allocate a new slice instead of reusing the old ms.ents. Entries in
// ms.ents are immutable, and can be referenced from outside MemoryStorage
// through slices returned by ms.Entries().
remainingCount := len(ms.ents) - int(i)
remainingCount := uint64(len(ms.ents)) - i
ents := make([]pb.Entry, remainingCount)
copy(ents, ms.ents[i:])
ms.ents = ents
Expand Down

0 comments on commit 685b9b3

Please sign in to comment.