-
Notifications
You must be signed in to change notification settings - Fork 132
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
remove ResetWriteBatch #141
Conversation
I am fine with the PR code-wise. But given that @denyeart and @bestbeforetoday are opposed to having this method, it makes sense to wait for their review. |
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 looks good to me, just one question to make sure we are on the same page...
func (h *Handler) handleStartWriteBatch(channelID string, txID string) { | ||
if !h.usePeerWriteBatch { | ||
return errors.New("peer does not support write batch") | ||
return |
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 guess the intent here is that chaincode developer can call StartWriteBatch(), and it will work regardless of whether peer supports it or not.
If supported, requests will be batched.
If not supported, requests will be sent individually (consistent with existing behavior).
That seems like the right approach to allow for hybrid environments where some peers may support it, while other peers do not yet support it.
Did I get that right?
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.
It might be worth clarifying that behavior in the godoc for StartWriteBatch.
I notice that the existing godoc for StartWriteBatch reads:
StartWriteBatch enables a mode where all changes are not immediately forwarded to the feast
Perhaps feast was supposed to read peer?
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 guess the intent here is that chaincode developer can call StartWriteBatch(), and it will work regardless of whether peer supports it or not. If supported, requests will be batched. If not supported, requests will be sent individually (consistent with existing behavior).
That seems like the right approach to allow for hybrid environments where some peers may support it, while other peers do not yet support it.
Did I get that right?
Yeah. That's right.
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.
It might be worth clarifying that behavior in the godoc for StartWriteBatch.
I notice that the existing godoc for StartWriteBatch reads:
StartWriteBatch enables a mode where all changes are not immediately forwarded to the feast
Perhaps feast was supposed to read peer?
That's right. Thank you for finding out. I fixed it.
Signed-off-by: Fedor Partanskiy <[email protected]>
d7ea266
to
838571a
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.
Thanks @pfi79 , looks good, I'll go ahead and merge.
hyperledger/fabric#5086