Skip to content
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

cli: extend logs of index file construction for upload-bin #3662

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

AnnaShaleva
Copy link
Member

These logs are needed to track the progress of uploaders. Based on these logs we'll try to optimize missing blocks fetching during index files construction.

These logs are needed to track the progress of uploaders.

Signed-off-by: Anna Shaleva <[email protected]>
Signed-off-by: Anna Shaleva <[email protected]>
@AnnaShaleva AnnaShaleva requested review from AliceInHunterland and removed request for roman-khimov November 5, 2024 08:25
@AnnaShaleva AnnaShaleva added this to the v0.107.0 milestone Nov 5, 2024
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 83.14%. Comparing base (95098d4) to head (a85f3ce).
Report is 8 commits behind head on master.

Files with missing lines Patch % Lines
cli/util/upload_bin.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3662      +/-   ##
==========================================
+ Coverage   83.13%   83.14%   +0.01%     
==========================================
  Files         334      334              
  Lines       46563    46563              
==========================================
+ Hits        38708    38715       +7     
+ Misses       6278     6273       -5     
+ Partials     1577     1575       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AliceInHunterland
Copy link
Contributor

AliceInHunterland commented Nov 5, 2024

By the way, maybe upload-bin can be upload-blocks, because bin is not really clear where is bin and what is bin.

@AnnaShaleva AnnaShaleva force-pushed the improve-uploadbin-log branch from e0f0bf0 to 3ac1129 Compare November 5, 2024 09:27
@AnnaShaleva
Copy link
Member Author

AnnaShaleva commented Nov 5, 2024

can be upload-blocks

I also thought about it, but it uploads not only blocks, but also index files. So naming is hard.

because bin is not really clear where is bin and what is bin.

It's an analogue of existing dump-bin and dump_bin.go.

Follow the style of other files in the `util` package and existing
`dump_bin.go`.

Signed-off-by: Anna Shaleva <[email protected]>
@AnnaShaleva AnnaShaleva force-pushed the improve-uploadbin-log branch from 3ac1129 to a85f3ce Compare November 5, 2024 09:43
@@ -425,14 +425,15 @@ func uploadIndexFiles(ctx *cli.Context, p *pool.Pool, containerID cid.ID, accoun
for idx := range indexFileSize {
if _, ok := processedIndices.Load(idx); !ok {
count++
fmt.Fprintf(ctx.App.Writer, "Index file %d: fetching missing block %d\n", i, i*indexFileSize+idx)
Copy link
Contributor

@AliceInHunterland AliceInHunterland Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't it be too chatty?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will, but currently there's completely no way to track the progress of "gaps" completion. Everything what I have is just one line:

2024-11-05 13:39:11.228	Index file X generated, checking for the missing blocks...

which is hanging in the air for several hours. This log allows us to track the progress and (in bad cases) to learn which objects are missing from the initial SEARCH request, it may help during NeoFS-related issues debugging.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hence I suggest to keep these logs for now.

@AnnaShaleva AnnaShaleva merged commit 8c4d943 into master Nov 6, 2024
33 of 34 checks passed
@AnnaShaleva AnnaShaleva deleted the improve-uploadbin-log branch November 6, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants