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: add warning for duplicated index files in upload-bin #3763

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

AliceInHunterland
Copy link
Contributor

Close #3762

Copy link
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

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

Have you located the reason?

@AliceInHunterland
Copy link
Contributor Author

Have you located the reason?

Left comment here #3762 (comment)

cli/util/upload_bin.go Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 17, 2024

Codecov Report

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

Project coverage is 83.06%. Comparing base (24f81a7) to head (c669ae3).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
cli/util/upload_bin.go 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3763      +/-   ##
==========================================
- Coverage   83.07%   83.06%   -0.01%     
==========================================
  Files         335      335              
  Lines       46746    46745       -1     
==========================================
- Hits        38832    38829       -3     
- Misses       6322     6324       +2     
  Partials     1592     1592              

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

@roman-khimov
Copy link
Member

Can this be fixed? Like checking for validity and deleting the one with lower hash?

@AnnaShaleva
Copy link
Member

AnnaShaleva commented Dec 17, 2024

Like checking for validity and deleting the one with lower hash?

We can, but do we really need this? It will complicate the process of uploading, whereas duplicating index files don’t hurt BlockFetcher, it always uses the first one.

I’d say that we need to properly handle uploading error in order not to retry if the object was stored.

And if it comes to audit of uploaded results, then I’d suggest to make a separate audit service in order to include not only index files maintenance, but also block objects verification. It sounds like a fully qualified separate issue to me.

@roman-khimov
Copy link
Member

I’d say that we need to properly handle uploading error in order not to retry if the object was stored.

NeoFS wouldn't be NeoFS if this was easy. You can PUT an object, get an incomplete placement error and still have it saved correctly (which is very likely the scenario we have here), it can be 1-2 replicas instead of 3 initially, but NeoFS will fix it eventually. The only way to check is SEARCH/GET.

make a separate audit service

At least a script for now. It all will be a service eventually, but

It sounds like a fully qualified separate issue to me.

and I agree.

@AnnaShaleva
Copy link
Member

Let's have #3764 for audit, and for now I'd leave upload-bin as it is.

cli/util/upload_bin.go Outdated Show resolved Hide resolved
cli/util/upload_bin.go Outdated Show resolved Hide resolved
As we are not afraid of duplicates this is not a critical error anymore.
BlockFetcher will take the first returned by search.

Close #3762

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
@AnnaShaleva AnnaShaleva merged commit 6d20772 into master Dec 17, 2024
32 of 34 checks passed
@AnnaShaleva AnnaShaleva deleted the index-duplicates branch December 17, 2024 13:27
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.

upload-bin may upload the same index file twice
3 participants