-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NeoFS block storage: add uploading commands #3582
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3582 +/- ##
==========================================
- Coverage 85.15% 84.67% -0.49%
==========================================
Files 333 334 +1
Lines 39022 39321 +299
==========================================
+ Hits 33231 33294 +63
- Misses 4221 4449 +228
- Partials 1570 1578 +8 ☔ View full report in Codecov by Sentry. |
@AnnaShaleva what do you think about adding more commands to neo-go cli?
|
8e1d6b3
to
64f6c7a
Compare
2938069
to
13e075a
Compare
13e075a
to
a6dc319
Compare
a6dc319
to
e5601ee
Compare
cli/util/uploader.go
Outdated
defer wg.Done() | ||
defer func() { <-workerPool }() | ||
|
||
oidBlock, err := searchBlockOID(ctx, clientSDK, account, containerID, blockAttributeKey, index) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still there; we can't use Search request for every block, it's too time-consuming, imagine we have to perform 128K Search requests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Time taken for index file generation with searches: 17m3.919291917s
Time taken for index file generation with getHeader: 14m57.008241s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've expected a bigger difference, btw. Still, that's it.
BTW, linter is failing. |
706 seconds / 1000 blocks = 0.706 seconds/block. 11m46s for 1k blocks with slicer version 394 seconds / 1000 blocks = 0.394 seconds/block. 6m34s for 1k blocks with pool (it still a month) with something like:
74 seconds / 1000 blocks = 0.074 seconds/block. 1m14s for 1k blocks (~5 days)
I haven't managed to repeat panic. successfully uploaded 1447000 blocks to testnet. |
e5601ee
to
1ddbbda
Compare
1ddbbda
to
0a4e1d1
Compare
cli/util/uploader.go
Outdated
producerWg.Add(numProducers) | ||
|
||
// Retry function with exponential backoff | ||
retry := func(action func() error) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we save it? Maybe yes? I like it. With it, timeouts are rare occasions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep it. Could you please point to the part of code that has a lot of timeout failures?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2024/09/26 20:46:33 Failed to fetch block 413230: failed to fetch block 413230: Post "https://rpc.morph.fs.neo.org": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Upload error: failed to fetch block 219272: Post "https://rpc.t5.n3.nspcc.ru:20331": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
I think this one
also from history, but with slicer:
failed to upload block 150079: failed to create slicer: network info: status: code = 1024 message = websocket: close 1006 (abnormal closure): unexpected EOF
2024/09/26 21:28:26 Failed to upload block 630944: failed to create slicer: network info: write request: rpc error: code = Unavailable desc = unexpected HTTP status code received from server: 502 (Bad Gateway); transport: received unexpected content-type "text/html"
failed to fetch max block index from container: failed to search objects from 321129 to 421128: error during object IDs iteration: rpc error: code = Internal desc = unexpected EOF
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good indeed! A couple of logic fixes are still needed, but overall looks much better.
b864e98
to
110d45b
Compare
2166582
to
be76869
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, that's almost it. I need the following:
- After you fix the remaining issues, try the final script on the testnet. Try to upload both blocks and index files (at least one index file is required). Provide at least three NeoFS SN addresses to the script to check how the pool works.
- Add a tiny section to
docs/neofs-blockstorage.md
about this command. Write what it does and examples on how to use it.
|
With ObjectSearchInitter ObjectSearch can can be done by both NeoFS SDK client and pool. Signed-off-by: Ekaterina Pavlova <[email protected]>
Signed-off-by: Ekaterina Pavlova <[email protected]>
Signed-off-by: Ekaterina Pavlova <[email protected]>
be76869
to
1313199
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise LGTM.
Still failing. |
1313199
to
dfbd127
Compare
This command is used for keeping container with blocks for blockfetcher updated. Close #3578 Signed-off-by: Ekaterina Pavlova <[email protected]>
dfbd127
to
6199240
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good. If any bugs are found during the script usage, we'll fix them in a separate PR.
example usage:
./bin/neo-go util upload-bin --cid 9iVfUg8aDHKjPC4LhQXEkVUM4HDkR7UCXYLs8NQwYfSG --wallet-config ./wallet-config.yml --block-attribute "ekt_eq" --index-attribute "oid-index" --rpc-endpoint https://rpc.t5.n3.nspcc.ru:20331 -fsr st1.t5.fs.neo.org:8080 -fsr st2.t5.fs.neo.org:8080 -fsr st3.t5.fs.neo.org:8080 -fsr st4.t5.fs.neo.org:8080 -fsr grpcs://st1.t5.fs.neo.org:8082