Skip to content

Conversation

NyaMisty
Copy link
Contributor

What problem are we solving?

For a long time, the volume.list output is not ordered.

How are we solving the problem?

It's because integer overflow in the compare func of slices.SortFunc. The a.Id & b.Id are uint32, which will give a large number when a < b due to integer underflow. The correct writing should be int(a.Id) - int(b.Id)

How is the PR tested?

Tested by hand

Checks

  • I have added unit tests if possible. (not needed)
  • I will add related wiki document changes and link to this PR after merging. (not need)

@chrislusf chrislusf merged commit 8d0e6f1 into seaweedfs:master Apr 27, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants