Blobovniczas
initialization won't return an explicit error #1624
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#1624
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Expected Behavior
initializeDBs
returns an error with a real failure reason instead ofcontext canceled
Current Behavior
When
BlobStor
initializesBlobovniczas
, it getscontext canceled
instead of an explicit error. This happens becauseerrGroup
cancels the context when it gets error from some invocation and propagates it down.So, we can't find out the real problem during after failed initialization.
Possible Solution
Send err to a channel in iterateIncompletedRebuildDBPaths
Regression
No
I believe
eg.Wait()
should return exactly the first error it has got, no?Can
context.Cause
help?We'll check soon
I think the problem is that
b.iterateExistingDBPaths(egCtx, func(p string) (bool, error)
uses errgroup's context. So when errgroup fails with an error,egCtx
is canceled, butiterateExistingDBPaths
fails beforeeg.Wait
.Yeah.
iterateExistingDBPaths
looks bizarre a bit. It may not launcheg.Go
at all if some internal error occurs and_ = eg.Wait()
is being ignored. So, that's why I suggested to introduce the error channelOr just move
iterateExistingDBPaths
toeg.Go