Commit graph

817 commits

Author SHA1 Message Date
593dd77d84
[#327] rpc: Fix mem leak
All checks were successful
DCO / DCO (pull_request) Successful in 26s
Tests and linters / Tests (pull_request) Successful in 1m20s
Code generation / Generate proto (pull_request) Successful in 33s
Tests and linters / Lint (pull_request) Successful in 2m16s
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
All checks were successful
DCO / DCO (pull_request) Successful in 26s
Code generation / Generate proto (pull_request) Successful in 33s
Tests and linters / Tests (pull_request) Successful in 42s
Tests and linters / Lint (pull_request) Successful in 1m52s
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
All checks were successful
DCO / DCO (pull_request) Successful in 25s
Code generation / Generate proto (pull_request) Successful in 30s
Tests and linters / Tests (pull_request) Successful in 46s
Tests and linters / Lint (pull_request) Successful in 1m50s
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
All checks were successful
DCO / DCO (pull_request) Successful in 1m36s
Code generation / Generate proto (pull_request) Successful in 1m25s
Tests and linters / Tests (pull_request) Successful in 2m16s
Tests and linters / Lint (pull_request) Successful in 3m6s
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
All checks were successful
DCO / DCO (pull_request) Successful in 28s
Code generation / Generate proto (pull_request) Successful in 34s
Tests and linters / Tests (pull_request) Successful in 44s
Tests and linters / Lint (pull_request) Successful in 2m4s
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
All checks were successful
DCO / DCO (pull_request) Successful in 26s
Tests and linters / Tests (pull_request) Successful in 46s
Tests and linters / Lint (pull_request) Successful in 1m52s
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
All checks were successful
DCO / DCO (pull_request) Successful in 3m38s
Tests and linters / Tests (pull_request) Successful in 3m59s
Tests and linters / Lint (pull_request) Successful in 5m30s
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
All checks were successful
Tests and linters / Lint (pull_request) Successful in 3m6s
DCO / DCO (pull_request) Successful in 4m10s
Tests and linters / Tests (pull_request) Successful in 4m33s
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
All checks were successful
DCO / DCO (pull_request) Successful in 1m34s
Tests and linters / Tests (pull_request) Successful in 2m3s
Tests and linters / Lint (pull_request) Successful in 2m16s
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-12-11 15:53:53 +03:00
3dbae11efa
[#310] client/container: Remove commented code
All checks were successful
DCO / DCO (pull_request) Successful in 1m35s
Tests and linters / Tests (pull_request) Successful in 2m5s
Tests and linters / Lint (pull_request) Successful in 2m15s
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
All checks were successful
DCO / DCO (pull_request) Successful in 1m27s
Tests and linters / Tests (pull_request) Successful in 1m47s
Tests and linters / Lint (pull_request) Successful in 2m12s
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
All checks were successful
Tests and linters / Lint (pull_request) Successful in 2m18s
DCO / DCO (pull_request) Successful in 2m19s
Tests and linters / Tests (pull_request) Successful in 2m21s
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
All checks were successful
DCO / DCO (pull_request) Successful in 1m15s
Tests and linters / Tests (pull_request) Successful in 1m33s
Tests and linters / Lint (pull_request) Successful in 2m16s
Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
2024-11-29 15:23:14 +03:00
afdc2d8340 [#297] bearer: Update module docstring
All checks were successful
DCO / DCO (pull_request) Successful in 1m2s
Tests and linters / Tests (pull_request) Successful in 1m19s
Tests and linters / Lint (pull_request) Successful in 1m57s
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
All checks were successful
DCO / DCO (pull_request) Successful in 1m17s
Tests and linters / Tests (pull_request) Successful in 1m22s
Tests and linters / Lint (pull_request) Successful in 2m4s
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
All checks were successful
DCO / DCO (pull_request) Successful in 38s
Tests and linters / Tests (pull_request) Successful in 1m13s
Tests and linters / Lint (pull_request) Successful in 2m36s
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
All checks were successful
DCO / DCO (pull_request) Successful in 41s
Tests and linters / Tests (pull_request) Successful in 1m8s
Tests and linters / Lint (pull_request) Successful in 2m36s
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
All checks were successful
DCO / DCO (pull_request) Successful in 59s
Tests and linters / Tests (pull_request) Successful in 1m13s
Tests and linters / Lint (pull_request) Successful in 2m4s
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
All checks were successful
DCO / DCO (pull_request) Successful in 44s
Tests and linters / Tests (pull_request) Successful in 1m10s
Tests and linters / Lint (pull_request) Successful in 1m58s
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
All checks were successful
DCO / DCO (pull_request) Successful in 50s
Tests and linters / Tests (pull_request) Successful in 1m25s
Tests and linters / Lint (pull_request) Successful in 2m3s
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
All checks were successful
DCO / DCO (pull_request) Successful in 35s
Tests and linters / Tests (pull_request) Successful in 1m19s
Tests and linters / Lint (pull_request) Successful in 2m43s
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
All checks were successful
DCO / DCO (pull_request) Successful in 56s
Tests and linters / Tests (pull_request) Successful in 1m11s
Tests and linters / Lint (pull_request) Successful in 1m24s
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
All checks were successful
DCO / DCO (pull_request) Successful in 52s
Tests and linters / Tests (pull_request) Successful in 1m0s
Tests and linters / Lint (pull_request) Successful in 1m55s
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
99d5bf913b [#269] netmap: Add tests for non-ascii attributes in SELECT IN
All checks were successful
DCO / DCO (pull_request) Successful in 30s
Tests and linters / Lint (pull_request) Successful in 2m8s
Tests and linters / Tests (pull_request) Successful in 54s
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-20 11:09:16 +00:00
e50838a33d [#269] netmap: Regenerate policy parser
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-20 11:09:16 +00:00
97cf56ba41 [#269] netmap: Support non-ascii attributes in SELECT IN
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-20 11:09:16 +00:00
07625e3bd1 [#269] Update ANTLR version 4.13.0 -> 4.13.1
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-20 11:09:16 +00:00
da2f0e7532 [#269] .gitignore: Ignore ANTLR jar file
The previous wildcard failed to properly match the ANTLR jar file.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-20 11:09:16 +00:00
114b4c14b5 [#269] Makefile: Update policy target
The previous policy target generated device-specific comments
(e.g., `/home/john_doe/repos/<...>`), which could result in
unnecessary file changes This behavior would confuse git and
require manual changes to resolve. The update ensures comments
are now device-agnostic, preventing unwanted changes.

Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-20 11:09:16 +00:00