* Added new method for listing containers to container service.
It opens stream and sends containers in batches.
* Added TransportSplitter wrapper around ExecutionService to
split container ID list read from contract in parts that are
smaller than grpc max message size. Batch size can be changed
in node configuration file (as in example config file).
* Changed `container list` implementaion in cli: now ListStream
is called by default. Old List is called only if ListStream
is not implemented.
* Changed `internalclient.ListContainersPrm`.`Account` to
`OwnerID` since `client.PrmContainerList`.`Account` was
renamed to `OwnerID` in sdk.
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
* Replaced `sort.Slice` with `slices.SortFunc` in
`ListContainersRes.SortedIDList()` as it is a bit faster,
according to 15102e6dfd.
Signed-off-by: Ekaterina Lebedeva <ekaterina.lebedeva@yadro.com>
Use `zap.Error` instead of `zap.String` for logging errors: change all expressions like
`zap.String("error", err.Error())` or `zap.String("err", err.Error())` to `zap.Error(err)`.
Leave similar expressions with other messages unchanged, for example,
`zap.String("last_error", lastErr.Error())` or `zap.String("reason", ctx.Err().Error())`.
This change was made by applying the following patch:
```diff
@@
var err expression
@@
-zap.String("error", err.Error())
+zap.Error(err)
@@
var err expression
@@
-zap.String("err", err.Error())
+zap.Error(err)
```
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
- Fix misplaced `(*DB).Close` (broken after 47dcfa20f3)
- Use `errors.Is` for error checking (broken after fcdbf5e509)
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
Also, make them public, because otherwise `unused` linter complains.
```
pkg/morph/event/utils.go:25:2 unused field `typ` is unused
```
This complain is wrong, though: we _use_ `typ` field because the whole
struct is used as a map key.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
They are decoupled, but it is an error to have a handler without a
corresponding parser. Register them together on the code level and get
rid of unreachable code.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This codepath hides possible bugs in code.
All initialization function should run before init stage.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Those errors are fired when it is enough chunks retrieved and error group
cancels other requests.
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
Notaryless environments are not tested at all since a while.
We use neo-go only and it has notary contract enabled.
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Pick up changes from TrueCloudLab/frostfs-sdk-go#198.
gopatch:
```
@@
var user expression
@@
-address.StringToUint160(user.EncodeToString())
+user.ScriptHash()
```
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
Since we have errors defined on the shard-level, it looks strage that we
check an error againt the shard-level error `ErrLockObjectRemoval`, but
then return the metabase-level error. Let's return the same shard-level
error instead.
Since we have errors defined on the shard-level
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>
Currently, it's allowed to inhume or lock an expired object.
Consider the following scenario:
1) An user inhumes or locks an object
2) The object expires
3) GC hasn't yet deleted the object
4) The node loses the associated tombstone or lock
5) Another node replicates tombstone or lock to the first node
In this case, the second node succeeds, which is the desired behavior.
Signed-off-by: Aleksey Savchuk <a.savchuk@yadro.com>