frostfs-node/pkg/local_object_storage/metabase
Evgenii Stratonikov a405fb1f39 [] metabase: Check object status once in Select()
objectStatus() is called twice for the same object:
First, in selectObject() to filter removed objects.
Then, again, in getObjectForSlowFilters() via db.get().
The second call will return the same result, so remove useless branch.

```
goos: linux
goarch: amd64
pkg: git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/metabase
cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
                          │     old     │                status                │
                          │   sec/op    │    sec/op     vs base                │
Select/string_equal-8       5.022m ± 7%   3.968m ±  8%  -20.98% (p=0.000 n=10)
Select/string_not_equal-8   4.953m ± 9%   3.990m ± 10%  -19.44% (p=0.000 n=10)
Select/common_prefix-8      4.962m ± 8%   3.971m ±  9%  -19.98% (p=0.000 n=10)
Select/unknown-8            5.246m ± 9%   3.548m ±  5%  -32.37% (p=0.000 n=10)
geomean                     5.045m        3.865m        -23.39%

                          │     old      │                status                │
                          │     B/op     │     B/op      vs base                │
Select/string_equal-8       2.685Mi ± 0%   2.250Mi ± 0%  -16.20% (p=0.000 n=10)
Select/string_not_equal-8   2.685Mi ± 0%   2.250Mi ± 0%  -16.20% (p=0.000 n=10)
Select/common_prefix-8      2.685Mi ± 0%   2.250Mi ± 0%  -16.20% (p=0.000 n=10)
Select/unknown-8            2.677Mi ± 0%   2.243Mi ± 0%  -16.24% (p=0.000 n=10)
geomean                     2.683Mi        2.248Mi       -16.21%

                          │     old     │               status                │
                          │  allocs/op  │  allocs/op   vs base                │
Select/string_equal-8       69.03k ± 0%   56.02k ± 0%  -18.84% (p=0.000 n=10)
Select/string_not_equal-8   69.03k ± 0%   56.02k ± 0%  -18.84% (p=0.000 n=10)
Select/common_prefix-8      69.03k ± 0%   56.02k ± 0%  -18.84% (p=0.000 n=10)
Select/unknown-8            68.03k ± 0%   55.03k ± 0%  -19.11% (p=0.000 n=10)
geomean                     68.78k        55.77k       -18.90%
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-03-18 11:48:51 +00:00
..
children.go [] node: Apply gofumpt 2023-10-31 17:03:03 +03:00
containers.go [] golangci: Enable unparam linter 2025-01-14 09:06:47 +03:00
containers_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
control.go [] storage: Remove "could not/can't/failed to" from error messages 2024-12-18 15:52:26 +00:00
control_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
counter.go [] golangci: Enable unparam linter 2025-01-14 09:06:47 +03:00
counter_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
db.go [] node: Use ctx for logging 2024-11-13 10:36:07 +03:00
db_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
delete.go [] golangci: Enable unparam linter 2025-01-14 09:06:47 +03:00
delete_ec_test.go [] metabase: Merge Inhume() and DropGraves() for tombstones 2024-11-14 06:47:04 +00:00
delete_meta_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
delete_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
errors.go [] Update frostfs-sdk-go and error pointer receivers 2023-08-09 10:26:53 +00:00
exists.go Revert "[] metabase: Ensure Unmarshal() is called on a cloned slice" 2025-01-09 14:34:20 +03:00
exists_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
expired.go [] metabase: Add expiration epoch buckets 2024-08-22 08:21:40 +00:00
expired_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
generic_test.go [#xx] Avoid manual management of files in tests 2023-08-14 14:01:39 +03:00
get.go Revert "[] metabase: Ensure Unmarshal() is called on a cloned slice" 2025-01-09 14:34:20 +03:00
get_test.go [] metabase/test: Fix BenchmarkGet 2024-12-13 13:18:43 +03:00
graveyard.go [] storage: Remove "could not/can't/failed to" from error messages 2024-12-18 15:52:26 +00:00
graveyard_test.go [] metabase: Merge Inhume() and DropGraves() for tombstones 2024-11-14 06:47:04 +00:00
index_test.go [] Do not use math/rand.Read 2023-08-09 16:02:44 +03:00
info.go [] meta: Fix concurrent mode changes 2022-11-19 11:01:04 +03:00
inhume.go [] golangci: Enable unparam linter 2025-01-14 09:06:47 +03:00
inhume_ec_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
inhume_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
iterators.go Revert "[] metabase: Ensure Unmarshal() is called on a cloned slice" 2025-01-09 14:34:20 +03:00
iterators_test.go [] metabase: Remove (*DB).IterateCoveredByTombstones 2024-11-29 10:49:24 +00:00
list.go [] Use slices.Clone()/bytes.Clone() where possible 2025-01-17 14:50:14 +03:00
list_test.go [] metabase/test: Update TestLisObjectsWithCursor 2024-12-26 14:39:50 +03:00
lock.go [] Use slices.Delete() where possible 2025-03-13 08:12:20 +00:00
lock_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
metrics.go [] node: Change mode of shard components 2024-06-05 05:55:24 +00:00
mode.go [] storage: Remove "could not/can't/failed to" from error messages 2024-12-18 15:52:26 +00:00
mode_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
put.go Revert "[] metabase: Ensure Unmarshal() is called on a cloned slice" 2025-01-09 14:34:20 +03:00
put_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
reset_test.go [] Use fmt.Appendf where warranted 2025-03-13 08:12:20 +00:00
select.go [] metabase: Check object status once in Select() 2025-03-18 11:48:51 +00:00
select_test.go [] metabase/test: Report allocs in benchmarkSelect() 2025-03-18 11:48:51 +00:00
shard_id.go [] storage: Remove "could not/can't/failed to" from error messages 2024-12-18 15:52:26 +00:00
storage_id.go [] golangci: Enable unparam linter 2025-01-14 09:06:47 +03:00
storage_id_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
upgrade.go [] morph: Add tracing for morph queries to neo-go 2025-02-05 16:38:20 +03:00
upgrade_test.go [] qos: Add qos service to adjust incoming IO tags 2025-02-07 15:43:03 +03:00
util.go [] storage: Remove "could not/can't/failed to" from error messages 2024-12-18 15:52:26 +00:00
version.go [] storage: Remove "could not/can't/failed to" from error messages 2024-12-18 15:52:26 +00:00
VERSION.md [] metabase: Bump version 2024-08-22 08:21:40 +00:00
version_test.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00