morph: Provide batch size for container listing explicitly #931

Merged
fyrchik merged 1 commit from fyrchik/frostfs-node:fix-iterator into master 2024-01-29 14:00:13 +00:00

1 commit

Author SHA1 Message Date
7502b9f07a [#931] morph: Provide batch size for container listing explicitly
All checks were successful
DCO action / DCO (pull_request) Successful in 10m57s
Vulncheck / Vulncheck (pull_request) Successful in 12m22s
Build / Build Components (1.20) (pull_request) Successful in 13m53s
Build / Build Components (1.21) (pull_request) Successful in 13m49s
Tests and linters / Staticcheck (pull_request) Successful in 15m4s
Tests and linters / Lint (pull_request) Successful in 20m4s
Tests and linters / Tests (1.21) (pull_request) Successful in 2m19s
Tests and linters / Tests with -race (pull_request) Successful in 3m51s
Tests and linters / Tests (1.20) (pull_request) Successful in 15m44s
Besides VM stack item limit we also have restrictions on the size of
JSON for a stackitem, which is 128k. This limit is much harder to
calculate, because JSON representation includes type and the encoding is
different for different items. Thus is makes no sense to invent our own
default, so use the one provided by neo-go. But for container listing we
know exactly what we process, so use big enough value, which is tested.

Introduced in be8607a1f6.

Refs #902
Refs https://github.com/nspcc-dev/neo-go/blob/v0.105.0/pkg/vm/stackitem/json.go#L353

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
2024-01-25 11:21:00 +03:00