Commit Graph

694 Commits (support/v1.0.0-rc.4)

Author SHA1 Message Date
Denis Kirillov 8412b075a5 [#226] pool/tree: Fix handling access denied error
Tests and linters / Tests (1.21) (pull_request) Successful in 1m18s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m26s Details
Tests and linters / Lint (pull_request) Successful in 2m18s Details
DCO / DCO (pull_request) Successful in 46s Details
(cherry picked from commit 6a52487edd)

Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2024-06-20 17:22:03 +03:00
Alexey Vanin e5040d35e9 [#212] pool: Control sub tree nodes order
Tests and linters / Tests (1.21) (pull_request) Successful in 1m34s Details
DCO / DCO (pull_request) Successful in 1m35s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m59s Details
Tests and linters / Lint (pull_request) Successful in 2m39s Details
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2024-04-02 17:15:32 +03:00
Alexander Chuprov 6f248436a5 [#210] client/put_transformer: Fix error handling
DCO / DCO (pull_request) Successful in 1m1s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m17s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m29s Details
Tests and linters / Lint (pull_request) Successful in 2m39s Details
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-03-19 15:36:51 +03:00
Evgenii Stratonikov edd40474e8 [#209] pre-commit: Add unit-test hook
DCO / DCO (pull_request) Successful in 1m27s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m36s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 2m5s Details
Tests and linters / Lint (pull_request) Successful in 3m13s Details
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-14 13:35:48 +03:00
Evgenii Stratonikov d9ec7c1988 [#209] Makefile: Allow to override test flags
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-14 13:35:48 +03:00
Evgenii Stratonikov 64b83f8220 [#209] Makefile: Update golangci-lint to 1.56.2
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-14 13:35:48 +03:00
Evgenii Stratonikov 7212f38115 [#209] pre-commit: Remove gitlint
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-14 13:35:48 +03:00
Dmitrii Stepanov 8081445ff2 [#208] go.mod: Bump frostfs-api-go version
DCO / DCO (pull_request) Successful in 1m5s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m34s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m30s Details
Tests and linters / Lint (pull_request) Successful in 2m56s Details
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-06 13:34:04 +03:00
Dmitrii Stepanov 6a7ef9d8c3 [#208] go.mod: Bump protobuf version
DCO / DCO (pull_request) Failing after 42s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 2m54s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 2m51s Details
Tests and linters / Lint (pull_request) Successful in 4m27s Details
Found by vulncheck:
Vulnerability #1: GO-2024-2611
    Infinite loop in JSON unmarshaling in google.golang.org/protobuf
  More info: https://pkg.go.dev/vuln/GO-2024-2611
  Module: google.golang.org/protobuf
    Found in: google.golang.org/protobuf@v1.32.0
    Fixed in: google.golang.org/protobuf@v1.33.0

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-03-06 13:23:32 +03:00
Evgenii Stratonikov 6fe4e2541d [#207] netmap: Fix string escape in PlacementPolicy.String()
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-03-01 15:02:05 +00:00
Denis Kirillov a5fab572ff [#206] Add session tokens for container read operations
Tests and linters / Tests (1.21) (pull_request) Successful in 1m29s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m37s Details
Tests and linters / Lint (pull_request) Successful in 2m45s Details
DCO / DCO (pull_request) Successful in 42s Details
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-03-01 15:18:53 +03:00
Dmitrii Stepanov a86170f53a [#202] object: Reset marshal data on `CutPayload`
DCO / DCO (pull_request) Successful in 1m1s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m20s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m26s Details
Tests and linters / Lint (pull_request) Successful in 2m13s Details
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-02-15 15:23:47 +03:00
Dmitrii Stepanov aa41f71dcc [#202] eacl: Drop storage group test
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-02-15 15:23:47 +03:00
Dmitrii Stepanov 3a00fd51e4 [#202] go.mod: Update api-go version
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-02-15 15:23:43 +03:00
Alexander Chuprov 65b4525b3b [#198] object/user: Add ScriptHash method
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-01-26 14:10:09 +00:00
Evgenii Stratonikov 7efff9d53d [#201] .forgejo: Update dco-go to v3
DCO / DCO (pull_request) Successful in 8m7s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 9m3s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 9m8s Details
Tests and linters / Lint (pull_request) Successful in 15m19s Details
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-26 12:21:42 +03:00
Alexander Chuprov 110b7e4170 [#200] pre-commit: Fix linter invocation target
DCO / DCO (pull_request) Successful in 1m33s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m49s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m56s Details
Tests and linters / Lint (pull_request) Successful in 3m21s Details
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2024-01-17 17:56:20 +03:00
Dmitrii Stepanov 56debcfa56 [#190] sdk-go: Gofumpt fixes
DCO / DCO (pull_request) Successful in 56s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m16s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m13s Details
Tests and linters / Lint (pull_request) Successful in 2m20s Details
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-11-22 19:21:20 +03:00
Dmitrii Stepanov 157a9930e8 [#190] sdk-go: Pass user.ID by value
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-11-22 19:21:20 +03:00
Alexander Chuprov 1c07098740 [#194] make: Fix make test
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2023-11-17 11:48:51 +00:00
Alexander Chuprov 03d35dd1f3 [#166] netmap: Add support YML tests
DCO / DCO (pull_request) Successful in 1m58s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 2m10s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 2m17s Details
Tests and linters / Lint (pull_request) Successful in 4m4s Details
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2023-11-17 14:43:03 +03:00
Alexander Chuprov dea8759762 [#166] netmap: Move tests from JSON to YML
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2023-11-17 14:42:39 +03:00
Airat Arifullin 3787477133 [#189] client: Make PrmDial fields public
DCO / DCO (pull_request) Successful in 42s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m19s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m29s Details
Tests and linters / Lint (pull_request) Successful in 2m58s Details
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2023-11-14 11:18:00 +03:00
Airat Arifullin e91d40e250 [#189] client: Make PrmInit fields public for client
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2023-11-13 15:18:07 +03:00
Denis Kirillov ab75edd709 [#191] pool/tree: Support limit request attempts
DCO / DCO (pull_request) Successful in 1m8s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m17s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m25s Details
Tests and linters / Lint (pull_request) Successful in 2m35s Details
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-11-07 14:45:40 +03:00
Denis Kirillov 8999d2f080 [#191] pool/tree: Support request id
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-11-07 14:45:35 +03:00
Airat Arifullin 6fbe1595cb [#121] pool: Refactor PrmObjectSearch usage
DCO / DCO (pull_request) Successful in 1m8s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m16s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m24s Details
Tests and linters / Lint (pull_request) Successful in 2m33s Details
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2023-11-01 17:45:15 +03:00
Airat Arifullin a9237aabd2 [#121] client: Make PrmObjectSearch fields public
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2023-11-01 17:45:06 +03:00
Airat Arifullin a487033505 [#121] client: Nuke out unused prmCommonMeta
DCO / DCO (pull_request) Successful in 1m1s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m25s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m25s Details
Tests and linters / Lint (pull_request) Successful in 2m29s Details
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-10-31 22:55:25 +03:00
Airat Arifullin 51c3618850 [#121] client: Make PrmContainerList fields public
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
2023-10-31 22:55:25 +03:00
Evgenii Stratonikov 665e5807bc [#188] transformer: Allow to provide size hint
For big objects with known size we can optimize allocation patterns
by providing size hint. As with any hint, it does not affect transformer
functionality: slices with capacity > MaxSize are never allocated.

```
goos: linux
goarch: amd64
pkg: git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/transformer
cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
                                                │     out     │
                                                │   sec/op    │
Transformer/small/no_size_hint-8                  65.44µ ± 3%
Transformer/small/no_size_hint,_with_buffer-8     64.24µ ± 5%
Transformer/small/with_size_hint,_with_buffer-8   58.70µ ± 5%
Transformer/big/no_size_hint-8                    367.8m ± 3%
Transformer/big/no_size_hint,_with_buffer-8       562.7m ± 0%
Transformer/big/with_size_hint,_with_buffer-8     385.6m ± 7%
geomean                                           5.197m

                                                │     out      │
                                                │     B/op     │
Transformer/small/no_size_hint-8                  13.40Ki ± 0%
Transformer/small/no_size_hint,_with_buffer-8     13.40Ki ± 0%
Transformer/small/with_size_hint,_with_buffer-8   13.39Ki ± 0%
Transformer/big/no_size_hint-8                    288.0Mi ± 0%
Transformer/big/no_size_hint,_with_buffer-8       1.390Gi ± 0%
Transformer/big/with_size_hint,_with_buffer-8     288.0Mi ± 0%
geomean                                           2.533Mi

                                                │    out     │
                                                │ allocs/op  │
Transformer/small/no_size_hint-8                  92.00 ± 0%
Transformer/small/no_size_hint,_with_buffer-8     92.00 ± 0%
Transformer/small/with_size_hint,_with_buffer-8   92.00 ± 0%
Transformer/big/no_size_hint-8                    546.5 ± 0%
Transformer/big/no_size_hint,_with_buffer-8       607.5 ± 0%
Transformer/big/with_size_hint,_with_buffer-8     545.5 ± 0%
geomean                                           228.1
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-10-30 12:13:04 +00:00
Evgenii Stratonikov a02c0bfac8 [#186] netmap: Marshal policy with brackets
DCO / DCO (pull_request) Successful in 1m14s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 1m34s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m47s Details
Tests and linters / Lint (pull_request) Successful in 2m52s Details
Brackets can be semantically important and must not be omitted,
otherwise the output is plain wrong.
We do not take the responsibility to preserve every bracket, though,
because parser does some optimizations related to grouping long chains
of filters combined with the same operation.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-10-27 10:54:45 +03:00
Evgenii Stratonikov 20d325e307 [#167] netmap: Fix reverse min agregator
The higher the price, the lower reverse min weight should be.
Previously nodes with 0 price had 0 weight which is a bit misleading.

Introduced in d71a0e0755.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2023-10-27 07:53:19 +00:00
Egor Olefirenko 670619d242 [#131] client: keep backwards-compatibility, update README.md, fix chore
Signed-off-by: Egor Olefirenko <egor.olefirenko892@gmail.com>
2023-10-26 14:35:49 +00:00
Egor Olefirenko 0d79d10482 [#131] client: rename option consistently and fix test
Signed-off-by: Egor Olefirenko <egor.olefirenko892@gmail.com>
2023-10-26 14:35:49 +00:00
Egor Olefirenko 9727beb47d [#131] client: Switch ResolveFrostFSFailures to DontResolveFrostFSFailures option
Signed-off-by: Egor Olefirenko <egor.olefirenko892@gmail.com>
2023-10-26 14:35:49 +00:00
Airat Arifullin 84315fab6a [#121] client: Make PrmBalanceGet fields public
Tests and linters / Tests (1.21) (pull_request) Successful in 1m1s Details
Tests and linters / Lint (pull_request) Successful in 2m29s Details
DCO / DCO (pull_request) Successful in 4m13s Details
Tests and linters / Tests (1.20) (pull_request) Failing after 5m47s Details
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2023-10-23 18:53:14 +03:00
Dmitrii Stepanov 71335489ae [#183] forgejo: Make linter great again
DCO / DCO (pull_request) Successful in 50s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m8s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 6m45s Details
Tests and linters / Lint (pull_request) Successful in 12m49s Details
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2023-10-23 18:13:40 +03:00
Airat Arifullin 4c1feaf2cb [#182] pool: Fix linter error about deprecated methods
DCO / DCO (pull_request) Successful in 1m11s Details
Tests and linters / Lint (pull_request) Successful in 1m30s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m25s Details
Tests and linters / Tests (1.19) (pull_request) Successful in 1m1s Details
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2023-10-23 17:40:00 +03:00
Airat Arifullin 5804128ff3 [#121] client: Make PrmObjectPutSingle fields public
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2023-10-19 08:38:13 +00:00
Denis Kirillov abd38c918e [#177] pool: Support NetMapSnapshot method
DCO / DCO (pull_request) Successful in 1m1s Details
Tests and linters / Lint (pull_request) Successful in 1m20s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m27s Details
Tests and linters / Tests (1.19) (pull_request) Successful in 1m36s Details
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2023-10-18 11:31:53 +03:00
Alexey Vanin fc4551b843 [#172] pool: Use priority of errors in tree pool
Tests and linters / Tests (1.20) (pull_request) Successful in 1m8s Details
Tests and linters / Lint (pull_request) Successful in 1m33s Details
DCO / DCO (pull_request) Successful in 5m8s Details
Tests and linters / Tests (1.19) (pull_request) Successful in 1m2s Details
When retry happens, use priority map to decide
which error to return. Consider network errors
less desirable than business logic errors.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-10-11 12:00:34 +03:00
Alexey Vanin eb5288f4a5 [#172] pool: Do more retries on unexpected tree service responses
DCO / DCO (pull_request) Successful in 2m12s Details
Tests and linters / Lint (pull_request) Successful in 3m33s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 3m35s Details
Tests and linters / Tests (1.19) (pull_request) Successful in 1m3s Details
1. Try its best by looking for nodes during 'GetNodeByPath'
2. Retry on 'tree not found' and other not found errors

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-10-06 11:12:48 +03:00
Alexey Vanin 60463871db [#171] pool: Add test for healthy status monitor
Tests and linters / Tests (1.20) (pull_request) Successful in 1m10s Details
Tests and linters / Lint (pull_request) Successful in 1m31s Details
DCO / DCO (pull_request) Successful in 4m12s Details
Tests and linters / Tests (1.19) (pull_request) Successful in 5m9s Details
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-10-03 19:47:22 +03:00
Alexey Vanin 8a04638749 [#171] pool: Close only dialed connections
To avoid panics during close operation, close
only dialed connections.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-10-03 19:47:22 +03:00
Alexey Vanin ddbfb758c9 [#171] pool: Use dial status to close connections during restarts
Every client restart, pool creates new client instance. If client
failed due to dial error, there was no prior connection and go
routine on a server side. If client failed due to communication
or business logic errors, then server side maintains connection and
client should close it to avoid routine and connection leak.

Dialing is a part of healthcheck, so health status is now a enum
of three values:
- unhealthy due to dial fail,
- unhealthy due to transmission fail,
- healthy.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-10-03 17:00:36 +03:00
andnilin@gmail.com d71a0e0755 [#88] netmap: use bool, fix hrw_sort tests
Signed-off-by: Andrew Danilin <andnilin@gmail.com>
2023-10-03 07:05:03 +00:00
AndrewDanilin 163b3e1961 [#88] netmap: fix min aggregator bug, add tests
Signed-off-by: Andrew Danilin <andnilin@gmail.com>
2023-10-03 07:05:03 +00:00
Airat Arifullin 84b9d29fc9 [#170] checksum: Use constant mapping for checksum types
DCO / DCO (pull_request) Successful in 1m8s Details
Tests and linters / Lint (pull_request) Successful in 1m22s Details
Tests and linters / Tests (1.19) (pull_request) Successful in 1m43s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m39s Details
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2023-09-28 17:20:24 +03:00
Alexey Vanin 99c273f499 [#169] pool: Close inner pools during close routine
DCO / DCO (pull_request) Successful in 1m9s Details
Tests and linters / Lint (pull_request) Successful in 1m26s Details
Tests and linters / Tests (1.20) (pull_request) Successful in 1m27s Details
Tests and linters / Tests (1.19) (pull_request) Successful in 1m44s Details
Some apps do not reuse pool instance and expect that
`pool.Close()` free resources. But it didn't actually
close inner SDK clients, so it leads to goroutine leak
in storage.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-09-20 12:16:13 +03:00