Commit 7de00d5
committed
container: reduce the number of fetched iterator items
An attempt to list 2K+ containers ended up this way:
error handler/util.go:34 call method {"status": 500, "request_id": "0cedec2b-935d-4575-a0c2-94ed4650c978", "method": "ListBuckets", "bucket": "", "object": "", "description": "something went wrong", "error": "list user containers via connection pool: status: code = 1024 message = json error: too big: size"}
We're trying to get 2K items from the iterator in a single call, each item is
base64 of CID, so it's 42 bytes, but then it's wrapped into VM type/value
struct like this:
{"value":"","type":"ByteString"}
which adds another 32 bytes. For 2K elements this yields 144K JSON (not
including other data which is also present) which NeoGo refuses to return
given that the maximum size is 128K (nspcc-dev/neo-go#3185).
Fetching in smaller chunks should fix the problem (for other iterator-based
methods as well).
Signed-off-by: Roman Khimov <[email protected]>1 parent a5ffd32 commit 7de00d5
2 files changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
0 commit comments