frostfs-node/pkg/local_object_storage/engine
Aleksey Savchuk 7fc6101bec
[] engine/test: Rework engine test utils
- Remove `testNewShard` and `setInitializedShards` because they
violated the default engine workflow. The correct workflow is:
first use `New()`, followed by `Open()`, and then `Init()`. As a
result, adding new logic to `(*StorageEngine).Init` caused several
tests to fail with a panic when attempting to access uninitialized
resources. Now, all engines created with the test utils must be
initialized manually. The new helper method `prepare` can be used
for that purpose.
- Additionally, `setInitializedShards` hardcoded the shard worker
pool size, which prevented it from being configured in tests and
benchmarks. This has been fixed as well.
- Ensure engine initialization is done wherever it was missing.
- Refactor `setShardsNumOpts`, `setShardsNumAdditionalOpts`, and
`setShardsNum`. Make them all depend on `setShardsNumOpts`.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-11-13 14:42:53 +03:00
..
container.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
control.go [] shard: Fix contextcheck linter 2024-11-13 10:36:09 +03:00
control_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
delete.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
delete_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
engine.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
engine_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
error_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
evacuate.go [] node: Use ctx for logging 2024-11-13 10:36:07 +03:00
evacuate_limiter.go [] control: Add ResetEvacuationStatus implementation 2024-03-13 10:29:45 +00:00
evacuate_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
exists.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
exists_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
get.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
head.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
head_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
info.go Rename package name 2023-03-07 16:38:26 +03:00
inhume.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
inhume_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
list.go [] engine: Fix engine metrics 2024-11-11 12:59:20 +03:00
list_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
lock.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
lock_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
metrics.go [] engine: Provide the default implementation to MetricsRegister 2024-10-03 08:23:06 +00:00
put.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
range.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
rebuild.go [] config: Move rebuild_worker_count to shard section 2024-09-06 13:57:27 +03:00
remove_copies.go [] node: Use ctx for logging 2024-11-13 10:36:07 +03:00
remove_copies_test.go [] go.mod: Use range over int 2024-09-03 13:00:54 +03:00
select.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
shards.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
shards_test.go [] engine/test: Rework engine test utils 2024-11-13 14:42:53 +03:00
tree.go [] node: Fix contextcheck linter 2024-11-13 10:36:10 +03:00
tree_test.go [] searchSvc: Check container is indexed 2024-10-08 11:41:50 +03:00
writecache.go [] writecache: Drop DB label from metrics 2024-09-12 15:06:33 +03:00