mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-01-03 09:22:49 +00:00
Merge pull request #3662 from nspcc-dev/improve-uploadbin-log
cli: extend logs of index file construction for `upload-bin`
This commit is contained in:
commit
8c4d9432d7
1 changed files with 2 additions and 2 deletions
|
@ -421,10 +421,10 @@ func uploadIndexFiles(ctx *cli.Context, p *pool.Pool, containerID cid.ID, accoun
|
||||||
// if searchObjects has returned not all blocks within the requested range, ref.
|
// if searchObjects has returned not all blocks within the requested range, ref.
|
||||||
// #3645. In this case, retry the search for every missing object.
|
// #3645. In this case, retry the search for every missing object.
|
||||||
var count int
|
var count int
|
||||||
|
|
||||||
for idx := range indexFileSize {
|
for idx := range indexFileSize {
|
||||||
if _, ok := processedIndices.Load(idx); !ok {
|
if _, ok := processedIndices.Load(idx); !ok {
|
||||||
count++
|
count++
|
||||||
|
fmt.Fprintf(ctx.App.Writer, "Index file %d: fetching missing block %d\n", i, i*indexFileSize+idx)
|
||||||
objIDs = searchObjects(ctx.Context, p, containerID, account, blockAttributeKey, i*indexFileSize+idx, i*indexFileSize+idx+1, 1, errCh)
|
objIDs = searchObjects(ctx.Context, p, containerID, account, blockAttributeKey, i*indexFileSize+idx, i*indexFileSize+idx+1, 1, errCh)
|
||||||
// Block object duplicates are allowed, we're OK with the first found result.
|
// Block object duplicates are allowed, we're OK with the first found result.
|
||||||
id, ok := <-objIDs
|
id, ok := <-objIDs
|
||||||
|
@ -432,7 +432,7 @@ func uploadIndexFiles(ctx *cli.Context, p *pool.Pool, containerID cid.ID, accoun
|
||||||
}
|
}
|
||||||
if !ok {
|
if !ok {
|
||||||
select {
|
select {
|
||||||
case errCh <- fmt.Errorf("block %d is missing from the storage", i*indexFileSize+idx):
|
case errCh <- fmt.Errorf("index file %d: block %d is missing from the storage", i, i*indexFileSize+idx):
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
return
|
return
|
Loading…
Reference in a new issue