Fix pilorama sorted listing #1330

Merged
fyrchik merged 2 commits from fyrchik/frostfs-node:fix-pochtabank into master 2024-08-26 06:11:34 +00:00

2 commits

Author SHA1 Message Date
a38f26b481 [#1328] pilorama: Do not skip items in SortedByFilename
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 2m46s
DCO action / DCO (pull_request) Successful in 3m13s
Vulncheck / Vulncheck (pull_request) Successful in 3m49s
Build / Build Components (1.22) (pull_request) Successful in 4m11s
Build / Build Components (1.23) (pull_request) Successful in 4m11s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m43s
Tests and linters / Tests (1.22) (pull_request) Successful in 4m49s
Tests and linters / Tests (1.23) (pull_request) Successful in 4m47s
Tests and linters / Staticcheck (pull_request) Successful in 4m47s
Tests and linters / Lint (pull_request) Successful in 5m8s
Tests and linters / gopls check (pull_request) Successful in 5m7s
Tests and linters / Tests with -race (pull_request) Successful in 5m13s
Benchmark results:
```
goos: linux
goarch: amd64
pkg: git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/pilorama
cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
                                   │     old     │                 new                 │
                                   │   sec/op    │   sec/op     vs base                │
ForestSortedIteration/bbolt,root-8   207.2µ ± 6%   173.6µ ± 6%  -16.23% (p=0.000 n=10)
ForestSortedIteration/bbolt,leaf-8   3.910µ ± 5%   3.928µ ± 7%        ~ (p=0.529 n=10)
geomean                              28.46µ        26.11µ        -8.27%
```

They are not representative, as the worst case is when we have multiple
items of different lengths. However, `FileName` is usually less than 100
in practice, so the asymptotics is the same.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-08-23 13:51:47 +03:00
6836d5df38 [#1328] pilorama: Add tricky test for SortedByFilename
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-08-23 13:51:47 +03:00