-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
[FAB-18132] Ch.Part.API: Remove ledger resources asynchronously #2027
Conversation
I noticed this change introduced a data races along with a few other bad things. Working on fixing this up. |
192bda4
to
407e25f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll do a more thorough review shortly, but for now, I noticed one spot in the tests that needs to be updated now that #2047 has been merged.
0ecdd82
to
2d5ba70
Compare
b0ced9d
to
2d6a499
Compare
ff8a247
to
521cd50
Compare
844330d
to
59908f3
Compare
0ccd4ed
to
b1e3ea5
Compare
@tock-ibm will do, first I need to clean up some flakiness with the int test. |
Looks good to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR now needs a rebase/rename for the "member" -> "consenter" change I noted. Sorry! That one was merged surprisingly quickly...
Signed-off-by: Tiffany Harris <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks, Tiffany!
Looks good to me. |
r.pendingRemoval[channelID] = true | ||
|
||
go func() { | ||
if err := r.ledgerFactory.Remove(channelID); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we make this simpler?
err := r.ledgerFactory.Remove(channelID)
r.lock.Lock()
defer r.lock.Unlock()
if err != nil {
....
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very much so yes - I'll handle in a follow-up.
if removalStatus { | ||
return types.ErrChannelPendingRemoval | ||
} else { | ||
return types.ErrChannelRemovalFailure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we "try again"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe #2027 (comment) this should only apply to the Joining a channel that experienced a removal failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's address in another PR
Type of change
Description
Removes ledger resources in asynchronously when channel participation APIs remove is called.
Related issues
FAB-18132