1a56bff502
[ #346 ] pool: 'Сlose' waits for all client operations to complete
...
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-03-14 16:03:07 +03:00
a262a0038f
[ #343 ] pool: Fix Yoda condition
...
go-staticcheck recommends not to use Yoda conditions.
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2025-03-10 19:24:58 +03:00
fe5b28e6bf
[ #338 ] pool: Support avg request time for ListContainerStream
...
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2025-03-10 19:24:58 +03:00
f70c0c9081
[ #300 ] pool: Remove obvious comments
...
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-03-07 11:45:31 +00:00
17177697b5
[ #300 ] pool/cm: Remove unused mutex in 'statistics'
...
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-03-07 11:45:31 +00:00
56046935b0
[ #300 ] pool: Move 'clientWrapper' to separate file
...
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-03-07 11:45:31 +00:00
cee7f9de47
[ #300 ] pool: Move 'connectionManager' to separate file
...
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-03-07 11:45:31 +00:00
d77a8742bc
[ #300 ] pool: Move 'healthCheck' to separate file
...
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-03-07 11:45:31 +00:00
b083bf8546
[ #300 ] pool: Extract healthCheck functionality from 'connectionManager' to 'healthCheck'
...
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-03-07 11:45:31 +00:00
b480df99ca
[ #300 ] pool: Extract connection handler functionality to 'connectionManager'
...
Signed-off-by: Alexander Chuprov <a.chuprov@yadro.com>
2025-03-07 11:45:31 +00:00
7a37613988
[ #339 ] pool/tree: Improve code after review
...
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-03-05 14:40:45 +03:00
d592bb931e
[ #339 ] pool/tree: Configure circuit breaker parameters
...
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-03-04 14:49:07 +03:00
06ef257ddc
[ #339 ] pool/tree: Do not lock mutex on circuit break function
...
Circuit break function may take some time to execute so it should
not be executed when lock is enabled.
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-03-04 14:41:01 +03:00
2d08fa5240
[ #339 ] pool/tree: Close replaced connection in client map
...
There is a race condition: multiple clients are created and dialled,
but only one is stored in the map. Others are remaining active but not
used.
With this change, new connection replaces old connection and closes
it.
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-03-04 14:41:01 +03:00
c5991fc66d
[ #339 ] pool/tree: Fix linter issues
...
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-03-04 12:22:38 +03:00
f78fb6dcb0
[ #339 ] pool/tree: Make circuit breaker more generic
...
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-03-04 12:21:11 +03:00
c8d71c450a
[ #339 ] pool/tree: Add circuit breaker
...
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-03-04 12:20:58 +03:00
2b8329e026
[ #336 ] pool/tree: Increase test coverage in TestStreamRetry
...
Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2025-02-28 12:32:56 +03:00
ada0513504
[ #336 ] pool/tree: Do probe in getSubTree to handle error in advance
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2025-02-28 10:46:01 +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
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
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
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
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
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
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
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
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
1dc3b77ac7
[ #270 ] pool: Replace deprecated DialContext
...
`Healthcheck` request performed after client creation, so no extra RPC required.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
2024-09-16 15:09:59 +03:00
7d84d104fb
[ #260 ] *: Fix linter warnings
...
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-09 08:55:32 +00:00
46ee543899
[ #265 ] go.mod: Use range
over int
...
Since Go 1.22 a `for` statement with a `range` clause is able
to iterate through integer values from zero to an upper limit.
gopatch script:
@@
var i, e expression
@@
-for i := 0; i <= e - 1; i++ {
+for i := range e {
...
}
@@
var i, e expression
@@
-for i := 0; i <= e; i++ {
+for i := range e + 1 {
...
}
@@
var i, e expression
@@
-for i := 0; i < e; i++ {
+for i := range e {
...
}
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
2024-09-04 12:37:46 +03:00
8f751d9dd0
[ #263 ] go.mod: Update api-go
...
Remove `client.ContainerEACL` and related references. This change
was initiated by the removal of `ContainerService.GetExtendedACL`
from the API.
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
2024-09-03 12:36:28 +03:00
3c00f4eeac
[ #203 ] Add pool docs
...
Signed-off-by: Nikita Zinkevich <n.zinkevich@yadro.com>
2024-08-30 08:24:31 +03:00
28f140bf06
[ #254 ] pool: Add parameter gracefulCloseOnSwitchTimeout
...
Add new param for waiting a little until current in-flight requests will be finished
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-08-22 08:02:51 +00:00
338d1ef254
[ #258 ] pool/tree: Add node address to error
...
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-08-20 14:19:58 +03:00
203bba65a0
[ #253 ] pool: Don't count regular FrostFS errors
...
Previously we count all frostfs errors like:
ObjectNotFound, EACLNotFound
because frostfs status is unconditionally resolved into built-in go errors
but handleError method handled built-in errors like internal network ones.
Since after resolving frostfs errors status is also returned we start check this first
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
2024-08-14 16:48:51 +03:00
908c96a94d
[ #251 ] pool: Fix handlerError
panic for objectPatch
...
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-08-13 15:28:39 +03:00
5d58519253
[ #249 ] pool: Introduce objectPatch
method
...
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
2024-08-08 18:26:40 +03:00
e83d6b7c6a
[ #244 ] pool/tree: Collect request duration statistic
...
After each request for tree pool statistic accumulated values are reset to zero.
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
2024-08-02 13:01:14 +03:00
9da46f566f
[ #243 ] go.mod: Update api-go
...
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-07-26 14:13:49 +03:00
fa89999d91
[ #242 ] pool: Log error that caused healthy status change
...
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
2024-07-22 15:12:27 +03:00
7e94a6adf2
[ #237 ] pool: Return creation epoch from object put
...
Signed-off-by: Marina Biryukova <m.biryukova@yadro.com>
2024-07-22 06:15:23 +00:00