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

blobstor: Additional context of errors #2608

Merged
merged 4 commits into from
Nov 15, 2023
Merged

blobstor: Additional context of errors #2608

merged 4 commits into from
Nov 15, 2023

Conversation

cthulhu-rider
Copy link
Contributor

Originally posted by @smallhive

warn	engine/engine.go:159	could not put object to shard	{"shard_id": "8TAArEwewr9p3aGppk4GVM", "error count": 24, "error": "could not put object to BLOB storage: operation not supported"}

@codecov
Copy link

codecov bot commented Oct 3, 2023

Codecov Report

Attention: 37 lines in your changes are missing coverage. Please review.

Comparison is base (59a8198) 28.67% compared to head (6836165) 28.67%.

❗ Current head 6836165 differs from pull request most recent head 2ad8cfd. Consider uploading reports for the commit 2ad8cfd to get more accurate results

Files Patch % Lines
pkg/local_object_storage/blobstor/fstree/fstree.go 51.51% 14 Missing and 2 partials ⚠️
...ct_storage/blobstor/fstree/fstree_write_generic.go 0.00% 14 Missing ⚠️
...ject_storage/blobstor/fstree/fstree_write_linux.go 16.66% 4 Missing and 1 partial ⚠️
...kg/local_object_storage/blobstor/fstree/control.go 0.00% 1 Missing ⚠️
pkg/local_object_storage/blobstor/put.go 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2608      +/-   ##
==========================================
- Coverage   28.67%   28.67%   -0.01%     
==========================================
  Files         415      415              
  Lines       32234    32253      +19     
==========================================
+ Hits         9244     9249       +5     
- Misses      22195    22207      +12     
- Partials      795      797       +2     

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

@cthulhu-rider cthulhu-rider force-pushed the fstree-err-ctx branch 2 times, most recently from 977868e to 9e833e3 Compare October 3, 2023 09:18
@cthulhu-rider cthulhu-rider marked this pull request as ready for review October 3, 2023 11:24
@@ -46,7 +46,7 @@ func (t *FSTree) writeData(p string, data []byte) error {
}

// unreachable, but precaution never hurts, especially 1 day before release.
return fmt.Errorf("couldn't read file after %d retries", retryCount)
return fmt.Errorf("couldn't write file after %d retries", retryCount)
Copy link
Member

Choose a reason for hiding this comment

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

wow, more like a bugfix for a separate commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is not a bug, just typo

Copy link
Member

Choose a reason for hiding this comment

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

logging "read" while writing is a bug to me. do not insist on a separate commit much

pkg/local_object_storage/blobstor/put.go Show resolved Hide resolved
@carpawell
Copy link
Member

Conflicts.

@roman-khimov
Copy link
Member

Do we still need this?

@carpawell
Copy link
Member

Do we still need this?

It has some little fixes. But should be rebased first to unserstand if it is good still.

Some errors may be too generic to detect the exact place they come from.
Additional context helps.

Signed-off-by: Leonard Lyubich <[email protected]>
After Go introduced `fs` package, error checkers from `os` packages may
be replaced with more laconic `errors.Is` ones. An additional benefit is
support for wrapped errors, which was not present in the old functions.

Signed-off-by: Leonard Lyubich <[email protected]>
Type helps to realize what exact storage failed.

Signed-off-by: Leonard Lyubich <[email protected]>
Previously, object command that opened dynamic session with storage node
(like `put`) failed with `can't fetch current epoch: can't parse RPC
endpoint: missing port in address` error when RPC endpoint was set in
the config file and omitted in flags.

Get network endpoint from viper box which contains values from config
file.

Refs #1574.

Signed-off-by: Leonard Lyubich <[email protected]>
@cthulhu-rider
Copy link
Contributor Author

rebased

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

It becomes too chatty to me, but OK (there are some nices fixes there as well).

@roman-khimov roman-khimov added this to the v0.39.0 milestone Nov 15, 2023
@cthulhu-rider
Copy link
Contributor Author

cthulhu-rider commented Nov 15, 2023

@roman-khimov my goal is to avoid messagges like in the PR body when i can only imagine what the exact problem is

at the same time, i dont wanna force such changes cuz of usefule fixes only, so i can split fixes (we'll merge them now) and error context changes (can hang for now)

@roman-khimov
Copy link
Member

Hanging changes are no good, they're either in or out.

@roman-khimov roman-khimov merged commit c673b51 into master Nov 15, 2023
8 checks passed
@roman-khimov roman-khimov deleted the fstree-err-ctx branch November 15, 2023 13:50
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.

3 participants