-
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
Adding block height check into orderer bootstrap #2594
Conversation
f11e603
to
a10f12c
Compare
Shouldn't we fix instead the core issue which is that the ledger creation for a channel isn't atomic? |
b310e5e
to
733a542
Compare
/ci-run |
AZP build triggered! |
733a542
to
3bc096e
Compare
@@ -113,16 +113,18 @@ type Registrar struct { | |||
// ConfigBlock retrieves the last configuration block from the given ledger. | |||
// Panics on failure. | |||
func ConfigBlock(reader blockledger.Reader) *cb.Block { |
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 you add a UT for this function?
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.
Yes, I will update the PR with UT
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.
The main intention of adding the UT was to cover the panic paths. Given that this function can take a mock as input, it should be straight forward to write this.
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.
Also, as you may want to make these changes into master as well. I'll suggest to brake these changes into two. One the original backporting PR as is and new changes in the master first.
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 corrected the UT now covering all error scenarios. Please check.
Should i need to create a separate PR for master branch?
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.
#2635 created a separate PR for main
553666c
to
d75168c
Compare
Channel with empty ledger led to crash in 2.2 release Higher version added a check to skip the channels with empty ledger & continue to start up. The same changes backported. Signed-off-by: Parameswaran Selvam <parselva@in.ibm.com>
d75168c
to
eeafb91
Compare
Opened different PRs. Closing this one |
Type of change
Description
Channel with empty ledger led to crash in 2.2 release
Higher version added a check to skip the channels with
empty ledger & continue to start up. The same changes
backported.
Updated GetBlock construct to retrieve the block by number
rather than using Iterator.
Signed-off-by: Parameswaran Selvam parselva@in.ibm.com