Commit graph

5216 commits

Author SHA1 Message Date
d165ac042c
[#1558] morph/client: Reuse notary rpcclient wrapper
All checks were successful
DCO action / DCO (pull_request) Successful in 5m31s
Tests and linters / Run gofumpt (pull_request) Successful in 5m35s
Tests and linters / gopls check (pull_request) Successful in 6m9s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m25s
Tests and linters / Staticcheck (pull_request) Successful in 6m26s
Build / Build Components (pull_request) Successful in 7m19s
Vulncheck / Vulncheck (pull_request) Successful in 7m16s
Tests and linters / Tests (pull_request) Successful in 7m37s
Tests and linters / Tests with -race (pull_request) Successful in 7m56s
Tests and linters / Lint (pull_request) Successful in 8m44s
Tests and linters / Run gofumpt (push) Successful in 1m32s
Vulncheck / Vulncheck (push) Successful in 3m2s
Tests and linters / Staticcheck (push) Successful in 3m43s
Build / Build Components (push) Successful in 4m5s
Tests and linters / Lint (push) Successful in 4m29s
Pre-commit hooks / Pre-commit (push) Successful in 5m7s
Tests and linters / Tests (push) Successful in 5m16s
Tests and linters / Tests with -race (push) Successful in 5m29s
Tests and linters / gopls check (push) Successful in 5m37s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-12 15:30:12 +03:00
7151c71d51
[#1558] morph/client: Remove "could not"/"can't"/"failed to" from error messages
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-12 15:30:12 +03:00
91d9dc2676
[#1558] morph/event: Remove "could not" from error messages
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-12 15:30:12 +03:00
7853dbc315 [#1557] morph/event: Remove embedded structs from scriptHashWithValue
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m23s
Tests and linters / Staticcheck (push) Successful in 3m10s
Vulncheck / Vulncheck (push) Successful in 4m8s
Tests and linters / Lint (push) Successful in 4m33s
Build / Build Components (push) Successful in 4m36s
Pre-commit hooks / Pre-commit (push) Successful in 5m14s
Tests and linters / Tests (push) Successful in 5m20s
Tests and linters / Tests with -race (push) Successful in 6m7s
Tests and linters / gopls check (push) Successful in 6m12s
Also, make them public, because otherwise `unused` linter complains.
```
pkg/morph/event/utils.go:25:2  unused  field `typ` is unused
```
This complain is wrong, though: we _use_ `typ` field because the whole
struct is used as a map key.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-12 11:55:09 +00:00
3821645085
[#1555] engine: Refactor (*StorageEngine).GetLocks
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 3m25s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m41s
DCO action / DCO (pull_request) Successful in 4m57s
Vulncheck / Vulncheck (pull_request) Successful in 5m28s
Build / Build Components (pull_request) Successful in 5m46s
Tests and linters / Staticcheck (pull_request) Successful in 6m0s
Tests and linters / Tests (pull_request) Successful in 6m34s
Tests and linters / Lint (pull_request) Successful in 6m51s
Tests and linters / Tests with -race (pull_request) Successful in 7m50s
Tests and linters / gopls check (pull_request) Successful in 2m51s
Tests and linters / Run gofumpt (push) Successful in 1m16s
Tests and linters / Staticcheck (push) Successful in 3m13s
Vulncheck / Vulncheck (push) Successful in 3m46s
Build / Build Components (push) Successful in 4m11s
Tests and linters / Lint (push) Successful in 4m26s
Pre-commit hooks / Pre-commit (push) Successful in 4m47s
Tests and linters / Tests with -race (push) Successful in 6m8s
Tests and linters / gopls check (push) Successful in 6m13s
Tests and linters / Tests (push) Successful in 2m36s
Refactored after renaming the method to replace the confusing `locked`
variable with `locks`.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-11 15:06:38 +03:00
72470d6b48
[#1555] local_object_storage: Rename method GetLocked -> GetLocks
Renamed to better reflect the method's purpose of returning locks
for the specified object.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-11 15:06:37 +03:00
e9837bbcf9 [#1554] morph/event: Remove unused AlphabetUpdate event
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m16s
Tests and linters / Staticcheck (push) Successful in 3m14s
Vulncheck / Vulncheck (push) Successful in 3m41s
Build / Build Components (push) Successful in 4m5s
Tests and linters / Lint (push) Successful in 4m53s
Pre-commit hooks / Pre-commit (push) Successful in 5m15s
Tests and linters / Tests (push) Successful in 5m52s
Tests and linters / Tests with -race (push) Successful in 6m24s
Tests and linters / gopls check (push) Successful in 6m32s
Refs TrueCloudLab/frostfs-contract#138.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 12:01:17 +00:00
a641c91594 [#1550] Add CODEOWNERS
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m18s
Tests and linters / Staticcheck (push) Successful in 3m12s
Vulncheck / Vulncheck (push) Successful in 3m47s
Tests and linters / Lint (push) Successful in 4m15s
Build / Build Components (push) Successful in 4m19s
Pre-commit hooks / Pre-commit (push) Successful in 5m5s
Tests and linters / Tests (push) Successful in 5m29s
Tests and linters / Tests with -race (push) Successful in 6m3s
Tests and linters / gopls check (push) Successful in 6m9s
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-12-11 10:34:57 +00:00
b1614a284d [#1546] morph/event: Export NotificationHandlerInfo fields
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m26s
Tests and linters / Staticcheck (push) Successful in 3m21s
Vulncheck / Vulncheck (push) Successful in 3m36s
Build / Build Components (push) Successful in 3m58s
Tests and linters / Lint (push) Successful in 4m30s
Pre-commit hooks / Pre-commit (push) Successful in 4m35s
Tests and linters / Tests (push) Successful in 5m15s
Tests and linters / Tests with -race (push) Successful in 5m33s
Tests and linters / gopls check (push) Successful in 5m45s
Hiding them achieves nothing, as the struct has no methods and is not
used concurrently.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
d0ce835fbf [#1546] morph/event: Merge notification parser and handlers
They are decoupled, but it is an error to have a handler without a
corresponding parser. Register them together on the code level and get
rid of unreachable code.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
dfa51048a8 [#1546] morph/event: Remove "is started" checks from event handler registrar
This codepath hides possible bugs in code.
All initialization function should run before init stage.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
670305a721 [#1546] morph/event: Remove nil checks from event handler registrar
This codepath hides possible bugs in code.
We would rather panic then silently fail.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 07:39:49 +00:00
1f6cf57e30 [#1548] metabase: Check if EC parent is removed or expired
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m26s
Tests and linters / Staticcheck (push) Successful in 3m14s
Vulncheck / Vulncheck (push) Successful in 3m46s
Build / Build Components (push) Successful in 4m16s
Pre-commit hooks / Pre-commit (push) Successful in 4m27s
Tests and linters / Lint (push) Successful in 4m30s
Tests and linters / Tests (push) Successful in 5m22s
Tests and linters / Tests with -race (push) Successful in 5m35s
Tests and linters / gopls check (push) Successful in 5m46s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-11 07:26:33 +00:00
386a12eea4 [#1548] engine: Rename parent -> ecParent
Parent could mean split parent or EC parent. In this case it is EC parent only.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-11 07:26:33 +00:00
15139d80c9 [#1548] policer: Do not replicate EC chunk if object already removed
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-11 07:26:33 +00:00
41da27dad5
[#1549] engine: Drop Async flag from evacuation parameters
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 4m4s
DCO action / DCO (pull_request) Successful in 5m4s
Pre-commit hooks / Pre-commit (pull_request) Successful in 5m5s
Vulncheck / Vulncheck (pull_request) Successful in 4m56s
Tests and linters / Staticcheck (pull_request) Successful in 5m10s
Build / Build Components (pull_request) Successful in 5m32s
Tests and linters / Tests with -race (pull_request) Successful in 6m24s
Tests and linters / Lint (pull_request) Successful in 6m36s
Tests and linters / Tests (pull_request) Successful in 6m46s
Tests and linters / gopls check (pull_request) Successful in 7m9s
Tests and linters / Run gofumpt (push) Successful in 1m34s
Tests and linters / Staticcheck (push) Successful in 3m22s
Vulncheck / Vulncheck (push) Successful in 3m43s
Tests and linters / Lint (push) Successful in 4m16s
Build / Build Components (push) Successful in 5m0s
Pre-commit hooks / Pre-commit (push) Successful in 5m3s
Tests and linters / Tests (push) Successful in 5m9s
Tests and linters / Tests with -race (push) Successful in 5m13s
Tests and linters / gopls check (push) Successful in 5m54s
Now it is only async evacuation.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-10 17:00:00 +03:00
ac0511d214
[#1549] controlSvc: Drop deprecated EvacuateShard rpc
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-10 16:59:52 +03:00
7e542906ef [#1539] go.mod: Bump frostfs-sdk-go version
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 2m49s
DCO action / DCO (pull_request) Successful in 3m5s
Vulncheck / Vulncheck (pull_request) Successful in 3m4s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m21s
Tests and linters / gopls check (pull_request) Successful in 3m29s
Build / Build Components (pull_request) Successful in 3m43s
Tests and linters / Staticcheck (pull_request) Successful in 4m22s
Tests and linters / Lint (pull_request) Successful in 5m3s
Tests and linters / Tests (pull_request) Successful in 5m23s
Tests and linters / Tests with -race (pull_request) Successful in 6m37s
Tests and linters / Run gofumpt (push) Successful in 2m18s
Tests and linters / Staticcheck (push) Successful in 4m36s
Vulncheck / Vulncheck (push) Successful in 5m14s
Build / Build Components (push) Successful in 5m41s
Pre-commit hooks / Pre-commit (push) Successful in 6m24s
Tests and linters / Tests with -race (push) Successful in 6m21s
Tests and linters / Lint (push) Successful in 6m57s
Tests and linters / gopls check (push) Successful in 7m27s
Tests and linters / Tests (push) Successful in 9m23s
* Also fix placement unit-test in object manager

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-12-06 15:29:37 +03:00
d1bc4351c3
[#1545] morph/event: Simplify frostfs contract event parsing
All checks were successful
DCO action / DCO (pull_request) Successful in 4m46s
Vulncheck / Vulncheck (pull_request) Successful in 5m22s
Build / Build Components (pull_request) Successful in 6m12s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m10s
Tests and linters / Run gofumpt (pull_request) Successful in 6m16s
Tests and linters / gopls check (pull_request) Successful in 6m19s
Tests and linters / Staticcheck (pull_request) Successful in 6m25s
Tests and linters / Lint (pull_request) Successful in 6m59s
Tests and linters / Tests (pull_request) Successful in 7m38s
Tests and linters / Tests with -race (pull_request) Successful in 8m37s
Tests and linters / Run gofumpt (push) Successful in 1m16s
Tests and linters / Staticcheck (push) Successful in 3m15s
Vulncheck / Vulncheck (push) Successful in 4m7s
Build / Build Components (push) Successful in 4m32s
Tests and linters / Lint (push) Successful in 4m50s
Pre-commit hooks / Pre-commit (push) Successful in 5m1s
Tests and linters / Tests (push) Successful in 5m14s
Tests and linters / Tests with -race (push) Successful in 5m54s
Tests and linters / gopls check (push) Successful in 6m2s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 14:00:23 +03:00
1c12f23b84 [#1541] morph/event: Simplify netmap contract event parsing
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 1m10s
Vulncheck / Vulncheck (push) Successful in 2m55s
Tests and linters / Staticcheck (push) Successful in 3m2s
Build / Build Components (push) Successful in 3m42s
Pre-commit hooks / Pre-commit (push) Successful in 3m46s
Tests and linters / Lint (push) Successful in 4m19s
Tests and linters / Tests (push) Successful in 4m23s
Tests and linters / gopls check (push) Successful in 4m44s
Tests and linters / Tests with -race (push) Successful in 5m18s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 10:26:39 +00:00
a353d45742 [#1541] morph/event: Simplify container contract event parsing
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 10:26:39 +00:00
d5c46d812a [#1541] go.mod: Update frostfs-contract
New version contains more idiomatic types in the auto-generated code.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 10:26:39 +00:00
d5d5ce2074 [#1541] morph/event: Simplify balance contract event parsing
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-06 10:26:39 +00:00
7df3520d48 [#1540] getSvc: Drop redundant returns
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 2m9s
Vulncheck / Vulncheck (push) Successful in 2m51s
Tests and linters / Staticcheck (push) Successful in 3m20s
Build / Build Components (push) Successful in 3m40s
Pre-commit hooks / Pre-commit (push) Successful in 3m42s
Tests and linters / gopls check (push) Successful in 4m16s
Tests and linters / Tests (push) Successful in 4m42s
Tests and linters / Lint (push) Successful in 4m49s
Tests and linters / Tests with -race (push) Successful in 5m6s
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-05 12:39:49 +00:00
5fe78e51d1 [#1540] getSvc: Do not log context canceled errors during EC assemble
Those errors are fired when it is enough chunks retrieved and error group
cancels other requests.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-12-05 12:39:49 +00:00
84b4051b4d
[#1538] morph/container: Make opts struct similar to that of other contracts
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 3m42s
DCO action / DCO (pull_request) Successful in 4m23s
Vulncheck / Vulncheck (pull_request) Successful in 5m24s
Build / Build Components (pull_request) Successful in 5m59s
Tests and linters / Staticcheck (pull_request) Successful in 5m58s
Tests and linters / gopls check (pull_request) Successful in 6m3s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m13s
Tests and linters / Tests with -race (pull_request) Successful in 6m13s
Tests and linters / Lint (pull_request) Successful in 6m19s
Tests and linters / Tests (pull_request) Successful in 7m43s
Tests and linters / Run gofumpt (push) Successful in 2m13s
Vulncheck / Vulncheck (push) Successful in 2m50s
Tests and linters / Staticcheck (push) Successful in 3m0s
Build / Build Components (push) Successful in 3m36s
Pre-commit hooks / Pre-commit (push) Successful in 3m40s
Tests and linters / gopls check (push) Successful in 4m16s
Tests and linters / Lint (push) Successful in 4m27s
Tests and linters / Tests (push) Successful in 4m31s
Tests and linters / Tests with -race (push) Successful in 5m26s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-04 15:30:58 +03:00
6a51086030
[#1538] morph/client: Remove TryNotary() option from side-chain contracts
The notary is always enabled and this option does always work.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-04 15:30:58 +03:00
5c3b2d95ba
[#1538] node: Assume notary is enabled
Notaryless environments are not tested at all since a while.
We use neo-go only and it has notary contract enabled.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-04 15:30:58 +03:00
2d5d4093be
[#1537] morph: Use (user.ID).ScriptHash() where possible
All checks were successful
DCO action / DCO (pull_request) Successful in 4m46s
Vulncheck / Vulncheck (pull_request) Successful in 6m4s
Pre-commit hooks / Pre-commit (pull_request) Successful in 6m21s
Build / Build Components (pull_request) Successful in 6m39s
Tests and linters / Run gofumpt (pull_request) Successful in 1m50s
Tests and linters / gopls check (pull_request) Successful in 3m7s
Tests and linters / Staticcheck (pull_request) Successful in 3m9s
Tests and linters / Lint (pull_request) Successful in 4m6s
Tests and linters / Tests (pull_request) Successful in 4m28s
Tests and linters / Tests with -race (pull_request) Successful in 5m28s
Tests and linters / Run gofumpt (push) Successful in 2m9s
Vulncheck / Vulncheck (push) Successful in 2m43s
Tests and linters / Staticcheck (push) Successful in 3m2s
Build / Build Components (push) Successful in 3m15s
Pre-commit hooks / Pre-commit (push) Successful in 3m48s
Tests and linters / gopls check (push) Successful in 4m5s
Tests and linters / Lint (push) Successful in 4m33s
Tests and linters / Tests (push) Successful in 4m36s
Tests and linters / Tests with -race (push) Successful in 4m50s
Pick up changes from TrueCloudLab/frostfs-sdk-go#198.

gopatch:
```
@@
var user expression
@@
-address.StringToUint160(user.EncodeToString())
+user.ScriptHash()
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-04 13:25:44 +03:00
e3487d5af5 [#1535] morph: Unify test invoke error messages
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 2m10s
Tests and linters / Staticcheck (push) Successful in 2m52s
Vulncheck / Vulncheck (push) Successful in 2m50s
Build / Build Components (push) Successful in 3m23s
Pre-commit hooks / Pre-commit (push) Successful in 3m33s
Tests and linters / gopls check (push) Successful in 4m8s
Tests and linters / Lint (push) Successful in 4m16s
Tests and linters / Tests (push) Successful in 4m19s
Tests and linters / Tests with -race (push) Successful in 5m1s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-04 09:50:20 +00:00
e37dcdf88b [#1535] morph/netmap: Unify error messages for config retrieval
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-04 09:50:20 +00:00
6c679d1535 [#1535] morph: Unify client creation error messages
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-04 09:50:20 +00:00
281d65435e
[#1450] engine: Group object by shard before Inhume
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 2m1s
DCO action / DCO (pull_request) Successful in 2m20s
Vulncheck / Vulncheck (pull_request) Successful in 2m23s
Build / Build Components (pull_request) Successful in 3m15s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m21s
Tests and linters / gopls check (pull_request) Successful in 3m21s
Tests and linters / Staticcheck (pull_request) Successful in 3m49s
Tests and linters / Lint (pull_request) Successful in 4m37s
Tests and linters / Tests (pull_request) Successful in 5m0s
Tests and linters / Tests with -race (pull_request) Successful in 6m12s
Tests and linters / Run gofumpt (push) Successful in 1m46s
Vulncheck / Vulncheck (push) Successful in 2m36s
Pre-commit hooks / Pre-commit (push) Successful in 2m55s
Build / Build Components (push) Successful in 3m8s
Tests and linters / gopls check (push) Successful in 3m30s
Tests and linters / Staticcheck (push) Successful in 3m36s
Tests and linters / Lint (push) Successful in 4m31s
Tests and linters / Tests (push) Successful in 4m56s
Tests and linters / Tests with -race (push) Successful in 6m7s
```
goos: linux
goarch: amd64
pkg: git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/engine
cpu: 12th Gen Intel(R) Core(TM) i5-1235U
                                 │   old.txt    │              new.txt                │
                                 │    sec/op    │   sec/op     vs base                │
InhumeMultipart/objects=1-12        11.42m ± 1%   10.71m ± 0%   -6.27% (p=0.000 n=10)
InhumeMultipart/objects=10-12       113.5m ± 0%   100.9m ± 3%  -11.08% (p=0.000 n=10)
InhumeMultipart/objects=100-12     1135.4m ± 1%   681.3m ± 2%  -40.00% (p=0.000 n=10)
InhumeMultipart/objects=1000-12     11.358 ± 0%    1.089 ± 1%  -90.41% (p=0.000 n=10)
InhumeMultipart/objects=10000-12   113.251 ± 0%    1.645 ± 1%  -98.55% (p=0.000 n=10)
geomean                              1.136        265.5m       -76.63%
```

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-04 10:09:00 +03:00
b348b20289
[#1450] engine: Add benchmark for Inhume operation
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-04 10:08:34 +03:00
748edd1999
[#1450] engine: Return shard-level error if object is expired on inhume
Since we have errors defined on the shard-level, it looks strage that we
check an error againt the shard-level error `ErrLockObjectRemoval`, but
then return the metabase-level error. Let's return the same shard-level
error instead.

Since we have errors defined on the shard-level

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-04 10:06:57 +03:00
47dfd8840c [#1532] node: Allow to omit metabase.path if shard is disabled
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 2m15s
Vulncheck / Vulncheck (push) Successful in 2m44s
Build / Build Components (push) Successful in 3m9s
Tests and linters / Staticcheck (push) Successful in 3m10s
Pre-commit hooks / Pre-commit (push) Successful in 3m38s
Tests and linters / gopls check (push) Successful in 4m14s
Tests and linters / Tests (push) Successful in 4m27s
Tests and linters / Lint (push) Successful in 4m34s
Tests and linters / Tests with -race (push) Successful in 4m51s
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-04 03:30:19 +00:00
432042c534
[#1527] engine: Add tests for handling expired objects on inhume and lock
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 2m11s
DCO action / DCO (pull_request) Successful in 2m27s
Vulncheck / Vulncheck (pull_request) Successful in 2m38s
Pre-commit hooks / Pre-commit (pull_request) Successful in 3m3s
Build / Build Components (pull_request) Successful in 3m20s
Tests and linters / gopls check (pull_request) Successful in 3m27s
Tests and linters / Staticcheck (pull_request) Successful in 4m0s
Tests and linters / Lint (pull_request) Successful in 4m39s
Tests and linters / Tests (pull_request) Successful in 5m9s
Tests and linters / Tests with -race (pull_request) Successful in 6m33s
Tests and linters / Run gofumpt (push) Successful in 2m18s
Vulncheck / Vulncheck (push) Successful in 2m55s
Build / Build Components (push) Successful in 3m11s
Tests and linters / Staticcheck (push) Successful in 3m23s
Pre-commit hooks / Pre-commit (push) Successful in 3m45s
Tests and linters / gopls check (push) Successful in 4m6s
Tests and linters / Lint (push) Successful in 4m29s
Tests and linters / Tests (push) Successful in 4m32s
Tests and linters / Tests with -race (push) Successful in 4m41s
Currently, it's allowed to inhume or lock an expired object.
Consider the following scenario:

1) An user inhumes or locks an object
2) The object expires
3) GC hasn't yet deleted the object
4) The node loses the associated tombstone or lock
5) Another node replicates tombstone or lock to the first node

In this case, the second node succeeds, which is the desired behavior.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-03 12:29:45 +03:00
9cabca9dfe
[#1527] engine/test: Move default metabase options to separate function
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-02 16:13:37 +03:00
60feed3b5f
[#1527] engine/test: Allow to specify current epoch in epochState
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-12-02 15:37:25 +03:00
635a292ae4 [#1528] cli: Keep order for required nodes in the result of object nodes
All checks were successful
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m54s
DCO action / DCO (pull_request) Successful in 3m6s
Vulncheck / Vulncheck (pull_request) Successful in 3m59s
Build / Build Components (pull_request) Successful in 4m46s
Tests and linters / Run gofumpt (pull_request) Successful in 1m33s
Tests and linters / gopls check (pull_request) Successful in 2m46s
Tests and linters / Staticcheck (pull_request) Successful in 3m22s
Tests and linters / Tests (pull_request) Successful in 4m14s
Tests and linters / Lint (pull_request) Successful in 4m18s
Tests and linters / Tests with -race (pull_request) Successful in 5m7s
Tests and linters / Run gofumpt (push) Successful in 2m32s
Vulncheck / Vulncheck (push) Successful in 3m0s
Pre-commit hooks / Pre-commit (push) Successful in 3m14s
Build / Build Components (push) Successful in 3m34s
Tests and linters / Lint (push) Successful in 4m1s
Tests and linters / Staticcheck (push) Successful in 4m17s
Tests and linters / gopls check (push) Successful in 4m23s
Tests and linters / Tests (push) Successful in 5m12s
Tests and linters / Tests with -race (push) Successful in 6m6s
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-12-02 13:58:24 +03:00
edfa3f4825 [#1528] node: Keep order for equal elements when sort priority metrics
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
2024-12-02 13:58:19 +03:00
e0ac3a583f [#1523] metabase: Remove (*DB).IterateCoveredByTombstones
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 3m15s
DCO action / DCO (pull_request) Successful in 3m26s
Pre-commit hooks / Pre-commit (pull_request) Successful in 4m38s
Tests and linters / gopls check (pull_request) Successful in 4m53s
Tests and linters / Lint (pull_request) Successful in 5m16s
Build / Build Components (pull_request) Successful in 5m51s
Vulncheck / Vulncheck (pull_request) Successful in 5m47s
Tests and linters / Staticcheck (pull_request) Successful in 8m3s
Tests and linters / Tests (pull_request) Successful in 9m16s
Tests and linters / Tests with -race (pull_request) Successful in 9m19s
Tests and linters / Run gofumpt (push) Successful in 2m8s
Vulncheck / Vulncheck (push) Successful in 2m41s
Build / Build Components (push) Successful in 3m18s
Tests and linters / Staticcheck (push) Successful in 3m15s
Pre-commit hooks / Pre-commit (push) Successful in 3m49s
Tests and linters / gopls check (push) Successful in 4m14s
Tests and linters / Lint (push) Successful in 4m21s
Tests and linters / Tests (push) Successful in 4m24s
Tests and linters / Tests with -race (push) Successful in 4m36s
Remove this method because it isn't used anywhere since 7799f8e4c.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-11-29 10:49:24 +00:00
00c608c05e [#1524] tree: Make check APE error get wrapped to api status
All checks were successful
Tests and linters / Run gofumpt (push) Successful in 2m57s
Tests and linters / Staticcheck (push) Successful in 3m40s
Vulncheck / Vulncheck (push) Successful in 3m47s
Build / Build Components (push) Successful in 4m40s
Pre-commit hooks / Pre-commit (push) Successful in 4m51s
Tests and linters / gopls check (push) Successful in 5m3s
Tests and linters / Tests with -race (push) Successful in 5m52s
Tests and linters / Tests (push) Successful in 6m47s
Tests and linters / Lint (push) Successful in 6m49s
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-11-29 10:48:16 +00:00
bba1892fa1 [#1524] ape: Make APE checker return error without status
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-11-29 10:48:16 +00:00
01acec708f
[#1525] pilorama: Use AppendUint* helpers from stdlib
All checks were successful
Tests and linters / Run gofumpt (pull_request) Successful in 2m6s
DCO action / DCO (pull_request) Successful in 2m24s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m54s
Vulncheck / Vulncheck (pull_request) Successful in 2m49s
Build / Build Components (pull_request) Successful in 3m13s
Tests and linters / gopls check (pull_request) Successful in 3m23s
Tests and linters / Staticcheck (pull_request) Successful in 3m54s
Tests and linters / Lint (pull_request) Successful in 4m41s
Tests and linters / Tests (pull_request) Successful in 4m56s
Tests and linters / Tests with -race (pull_request) Successful in 5m57s
Tests and linters / Run gofumpt (push) Successful in 3m4s
Vulncheck / Vulncheck (push) Successful in 3m23s
Tests and linters / Staticcheck (push) Successful in 3m51s
Build / Build Components (push) Successful in 4m21s
Pre-commit hooks / Pre-commit (push) Successful in 4m41s
Tests and linters / gopls check (push) Successful in 4m41s
Tests and linters / Tests with -race (push) Successful in 5m15s
Tests and linters / Lint (push) Successful in 5m56s
Tests and linters / Tests (push) Successful in 6m7s
gopatch:
```
@@
var slice, e expression
@@
+import "encoding/binary"

-append(slice, byte(e), byte(e >> 8))
+binary.LittleEndian.AppendUint16(slice, e)
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-28 09:40:20 +03:00
aac65001e5 [#1522] adm/frostfsid: Remove unreachable condition
All checks were successful
Vulncheck / Vulncheck (push) Successful in 2m35s
Tests and linters / Staticcheck (push) Successful in 2m52s
Tests and linters / Run gofumpt (push) Successful in 2m55s
Build / Build Components (push) Successful in 3m13s
Pre-commit hooks / Pre-commit (push) Successful in 3m15s
Tests and linters / gopls check (push) Successful in 3m53s
Tests and linters / Lint (push) Successful in 4m4s
Tests and linters / Tests (push) Successful in 4m21s
Tests and linters / Tests with -race (push) Successful in 4m59s
SendConsensusTx() modifies SendTxs field, if it is not the case, there
is a bug in code.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
1170370753 [#1522] adm/helper: Rename createSingleAccounts() -> getSingleAccounts()
It doesn't create any accounts, purely finds them in the wallet.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
9e275d44c8 [#1522] adm/helper: Unexport DefaultClientContext()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
2469e0c683 [#1522] adm/helper: Remove NewActor() helper
It is used once, it is used only internally and it is single-statement.
I see no justification in having it as a separate function.
It introduces confusion, because we also have NewLocalActor().

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00
a6ef4ab524 [#1522] adm/helper: Rename GetN3Client() -> NewRemoteClient()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-11-26 08:13:35 +00:00