nspcc-dev / neo-go

Go Node and SDK for the Neo blockchain
MIT License
123 stars 79 forks source link

cli: add retries if search results are not expected length in `upload-bin` #3650

Closed AliceInHunterland closed 2 weeks ago

AliceInHunterland commented 2 weeks ago

Close #3647

check empty oids in progress

AliceInHunterland commented 2 weeks ago

@AnnaShaleva am I correct that we still need that flag for skipping?

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 0.45249% with 220 lines in your changes missing coverage. Please review.

Please upload report for BASE (master@a4633ce). Learn more about missing BASE report. Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
cli/util/uploader.go 0.00% 220 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #3650 +/- ## ========================================= Coverage ? 83.06% ========================================= Files ? 334 Lines ? 46563 Branches ? 0 ========================================= Hits ? 38678 Misses ? 6311 Partials ? 1574 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

AnnaShaleva commented 2 weeks ago

OK, the solution with resulting OID batch size check is not working, we need to allow duplicating entries since containers may have an arbitrary number of blocks with the same height. But let's keep --skip-blocks-uploading flag.

AnnaShaleva commented 2 weeks ago

@AliceInHunterland, review the updated code. Make sure you understand routines-related code. Leave comments if something is not clear or invalid, we'll discuss it then. Move unrelated style changes to separate commits. Check if this version works properly on mainnet.

AliceInHunterland commented 2 weeks ago

@AnnaShaleva as we can get oid when putting we can do something like this https://github.com/nspcc-dev/neo-go/commit/a0a0358cb11510911696f1d2ec505f8b6cb7f3c3?

AnnaShaleva commented 2 weeks ago

as we can get oid when putting we can do something like this https://github.com/nspcc-dev/neo-go/commit/a0a0358cb11510911696f1d2ec505f8b6cb7f3c3?

It's a separate optimisation, not related to #3647. Create an issue for that, add reference to commit. And uploadIndexFiles can't be removed anyway, we must consider cases when you don't have all OIDs in-place.

AnnaShaleva commented 2 weeks ago

And for the current PR in a separate commit replace HEAD with GET to retrieve block index by OID. We'll revert it once https://github.com/nspcc-dev/neofs-node/issues/2988 is fixed.