diff options
| author | chrislu <chris.lu@gmail.com> | 2023-09-25 09:35:16 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2023-09-25 09:35:16 -0700 |
| commit | 645ae8c57bc449cbb298e90d1ad19f7d2153aea0 (patch) | |
| tree | 08458e352ea27e8e673a3670269ec84f04512d77 /weed/filer/filechunks2_test.go | |
| parent | 3d07895518b2b6e816518be0a2355c1f0a98ff15 (diff) | |
| download | seaweedfs-645ae8c57bc449cbb298e90d1ad19f7d2153aea0.tar.xz seaweedfs-645ae8c57bc449cbb298e90d1ad19f7d2153aea0.zip | |
Revert "Revert "Merge branch 'master' of https://github.com/seaweedfs/seaweedfs""
This reverts commit 8cb42c39
Diffstat (limited to 'weed/filer/filechunks2_test.go')
| -rw-r--r-- | weed/filer/filechunks2_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/weed/filer/filechunks2_test.go b/weed/filer/filechunks2_test.go index 6966360ad..6728aec0d 100644 --- a/weed/filer/filechunks2_test.go +++ b/weed/filer/filechunks2_test.go @@ -73,11 +73,11 @@ func TestCompactFileChunksRealCase(t *testing.T) { } func printChunks(name string, chunks []*filer_pb.FileChunk) { - slices.SortFunc(chunks, func(a, b *filer_pb.FileChunk) bool { + slices.SortFunc(chunks, func(a, b *filer_pb.FileChunk) int { if a.Offset == b.Offset { - return a.ModifiedTsNs < b.ModifiedTsNs + return int(a.ModifiedTsNs - b.ModifiedTsNs) } - return a.Offset < b.Offset + return int(a.Offset - b.Offset) }) for _, chunk := range chunks { glog.V(0).Infof("%s chunk %s [%10d,%10d)", name, chunk.GetFileIdString(), chunk.Offset, chunk.Offset+int64(chunk.Size)) |
