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>
Update tree service to fix split tree problem.
Tree intermediate nodes can be duplicated so we must handle this.
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
* Remove GetEACL, SetEACL methods as they are deprecated;
* Fix mock;
* Introduce add/remove/list methods to request ape-manager from
the client.
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
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>
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>
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>
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>
* Remove common PrmObjectRead structure
* Introduce buildRequest for PrmObjectGet/Head/GetRange
* Refactor the usage of these params in pool
Signed-off-by: Airat Arifullin <a.arifullin@yadro.com>
Tests showed that using part buffer pool doesn't save memory a lot.
Especially on big parts.
Probably we can use pool only for small parts
after adding buffer in payloadSizeLimiter
Signed-off-by: Denis Kirillov <d.kirillov@yadro.com>
* Add WaitParams.CheckValidity() check because SetWaitParams is deprecated,
but parameters were checked within this setter with checkForPositive()
Signed-off-by: Airat Arifullin a.arifullin@yadro.com