Commit graph

823 commits

Author SHA1 Message Date
7bdc78f2b5
[#332] client/status: Support RESOURCE_EXHAUSTED status
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-06 11:38:57 +03:00
cf0bbd03ae
[#332] api/status: Regenerate common statuses
Introduced a new common status `RESOURCE_EXHAUSTED`.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-06 11:38:45 +03:00
5a35fa4353 [#331] pool: Fix 'sortServers' in tree pool server test
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-02-05 10:44:03 +03:00
4ecbfb0edf [#331] pool: Add mocked test tree service and check goroutine leak
Use real gRPC connection in new mocked tree service.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-02-04 21:15:15 +03:00
f08a7f0b3c [#331] pool: Avoid connection leak in tree pool with netmap support
To avoid connection leak, call `close()` immediately after connection
is established. In regular tree pool, unhealthy connections are handled
by background goroutine which calls `redialIfNecessary()` to reestablish
connection. Here it is not viable so connection must be close.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-02-04 21:15:10 +03:00
8389887a34
[#319] object/transformer: Add expiration epoch to each part
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2025-02-02 18:14:21 +03:00
593dd77d84
[#327] rpc: Fix mem leak
gRPC stream must be closed by `cancel` to prevent memleak.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-01-30 12:53:43 +03:00
2786fadb25 [#326] pool: Add test for concurrent client deletion
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-01-29 20:16:59 +03:00
37350dbb1e [#326] pool: Fix panic that causes mutex deadlock
Two concurrent 'deleteClientFromMap' calls for
the same client may produce panic and deadlock.

First goroutine acquires lock, removes element
from the map, releases lock.

Second goroutine acquires lock, and throws panic
while trying to call 'close()' on empty struct.
Lock is never released and it causes deadlock for
other goroutines.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-01-29 20:14:55 +03:00
d195cb5104
[#324] rpc: Fix mem leak
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2025-01-29 16:34:30 +03:00
00cebd297f [#303] user: Make user.ID a util.Uint160
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2025-01-28 18:01:21 +03:00
761d087b93 [#302] user: Make ScriptHash return no error
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2025-01-27 19:13:52 +03:00
9d7f7bd04f
[#320] .forgejo: Add generate-proto action
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-01-21 14:35:18 +03:00
7c577ecaeb
[#320] api: Run 'make proto'
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-01-21 14:33:23 +03:00
4b4f35bbac
[#320] make/proto: Add installing protoc-gen-go-grpc
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-01-21 14:32:02 +03:00
328d214d2d
[#317] api: Revert easyproto marshaler usage
It has caused a noticeable degradation in node.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-09 11:46:09 +03:00
bab4d5a692
[#317] go.mod: Update protobuf version
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2025-01-09 11:46:08 +03:00
42a0fc8c13 [#305] tree/pool: Add flag to use net map to prioritize tree services
New version of tree/pool selects tree service connection to make request based on the current net map and container placement policy

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
2024-12-18 09:23:44 +03:00
dcd4ea334e
[#315] api: Restore test.proto file
Introduced in #281.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-16 10:42:16 +03:00
c757365752 [#309] Refine CODEOWNERS settings
Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-12-12 12:34:51 +00:00
902f32eeab [#312] pool: Ignore ECInfoErr errors in GetSplitInfo
* Ignore `ECInfoError` errors after raw `HeadObject` request

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-12-12 10:12:24 +00:00
d86cf85b39 [#311] client/container: Remove outdated comment
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-12-11 15:53:53 +03:00
3dbae11efa
[#310] client/container: Remove commented code
Refs #291.

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-11 14:23:44 +03:00
c4463df8d4 [#291] container: Rename field Account to OwnerID in PrmContainerList
Renaming this field so that it matches PrmContainerListStream.

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-12-10 13:49:38 +03:00
852dac1476 [#291] container: Add ListStream method
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-12-10 13:49:38 +03:00
e3026d3f4c [#291] container: Add ListStream to api
Since api was moved from `TrueCloudLab/frostfs-api-go` to sdk,
moving changes from TrueCloudLab/frostfs-api-go#125 here.

Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-12-10 12:05:56 +03:00
81c423e709 [#301] rpc: Make client stream initialization get cancelled by dial timeout
* `c.conn` may be already invalidated but the rpc client can't detect this.
  `NewStream` may hang trying to open a stream with invalidated connection.
  Using timer with `dialTimeout` for `NewStream` fixes this problem.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-12-06 09:49:44 +00:00
f7da6ba99c
[#306] netmap: Allow to select empty set of nodes
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-12-05 15:33:29 +03:00
0352b5b191
[#185] Implement rpc/client for tree service
Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
2024-11-29 15:23:14 +03:00
afdc2d8340 [#297] bearer: Update module docstring
Module top level docstring was referencing outdated APIs which do not
exist anymore.

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-11-13 10:41:25 +03:00
cb813e27a8 [#293] object: Fix payload size limiter
* Sending empty chunks by `writeChunk` should not release new
  objects as this doesn't change `payloadSizeLimiter` internal
  state.
* This also fixes the bug with patcher when an offset of a patch
  equals to `MaxSize` - `payloadSizeLimiter` releases object again
  although state is the same. This led to error because EC-encoder
  receieved empty payload and couldn't not process it.

Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-11-07 12:11:19 +00:00
6980651785 [#296] Stop using obsolete .github directory
This commit is a part of multi-repo cleanup effort:
TrueCloudLab/frostfs-infra#136

Signed-off-by: Vitaliy Potyarkin <v.potyarkin@yadro.com>
2024-11-07 06:15:50 +00:00
43d5c8dbac [#185] tree/pool: Control timeout of tree service operations
Implemented context timeout for all tree service operations except those that return a GRPC stream

Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
2024-11-06 08:12:37 +00:00
56c4aaaaca
[#292] .golangci.yml: Add intrange linter, fix warnings
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-31 09:40:42 +03:00
afbe15086f
[#292] Makefile: Update golangci-lint to v1.61.0
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-31 09:40:42 +03:00
56c357d520
[#292] Makefile: Update truecloudlab lint to v0.0.7
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-31 09:40:42 +03:00
5e926df3ab
[#292] .golangci.yml: Replace exportloopref with copyloopvar
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-31 09:40:42 +03:00
6ce73790ea [#276] Merge repo with frostfs-api-go
Signed-off-by: Pavel Pogodaev <p.pogodaev@yadro.com>
2024-10-22 14:05:12 +00:00
5361f0eceb [#279] pool: Count errors in object search
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
2024-10-22 12:41:11 +00:00
05aa3becae [#278] pool: Don't make maintenance node healthy in rebalance
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-10-17 16:31:49 +03:00
79f387317a [#283] pool: Mark node unhealthy if node is under maintenance
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-10-16 15:22:05 +03:00
3ea4741231 [#283] go.mod: Tidy
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-10-16 15:20:53 +03:00
d7872061f8
[#284] go.mod: Update api-go
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-11 15:17:23 +03:00
99c5c58365
[#282] client: Close connection on non-nil error in Dial
A particular status code does not imply that a connection has not been
established. However, `Dial()` requires user to call `Close()` only if
the error was nil. Thus, it is `Dial()` responsibility to close
everything if it returns an error.

Introduced after the gRPC update in #270 (6009d089fc).

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-10-10 14:03:44 +03:00
4c310ae1c7 [#280] client: Use DialTimeout for gRPC dial
After removing `grpc.Dial` from client `DialTimeout` used only if
custom dialer provided. Client uses `BalanceOf` instead of `grpc.Dial`,
so it is required to use `DialTimeout` to not to use RPC timeout.

Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-10-07 16:58:05 +03:00
997346ef95
[#274] client/status: Add missing test cases for commom statuses
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-10-03 17:05:15 +03:00
7f6eda566a
[#274] client/status: Fix check in TestNodeUnderMaintenance test
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-10-03 17:05:15 +03:00
d00892f418
[#274] client/status: Support INVALID_ARGUMENT status
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-10-03 17:05:08 +03:00
b9092aeb0c
[#274] go.mod: Update api-go
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-10-02 11:07:19 +03:00
1b67ab9608 [#275] client: Return status from all methods
Since status is checked first in handleError method, it should be returned from client methods

Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
2024-09-24 18:29:32 +03:00