Skip to content

Return (response, error) #3#1711

Merged
tamird merged 1 commit intocockroachdb:masterfrom
tamird:return-replies-3
Jul 17, 2015
Merged

Return (response, error) #3#1711
tamird merged 1 commit intocockroachdb:masterfrom
tamird:return-replies-3

Conversation

@tamird
Copy link
Copy Markdown
Contributor

@tamird tamird commented Jul 17, 2015

More work toward #1400.

@tbg tbg added the PTAL label Jul 17, 2015
@tbg
Copy link
Copy Markdown
Member

tbg commented Jul 17, 2015

LGTM. Is the end goal to move away from the (request, response) signature everywhere? Otherwise there will always be one awkward copy/merge. It sounds that for #1400 all you're really changing is that you're always returning the error and setting it later along with an assertion, and that the (request,response) change is technically separate. Were you hoping to implement a solution that precludes lower-level actors from even setting an error, and if so which one?

@tamird
Copy link
Copy Markdown
Contributor Author

tamird commented Jul 17, 2015

Is the end goal to move away from the (request, response) signature everywhere?

Yeah, all the way up to the sender. Note @bdarnell already did this on the method registration side, so it's a natural end state.

It sounds that for #1400 all you're really changing is that you're always returning the error and setting it later along with an assertion, and that the (request,response) change is technically separate.

Yep, totally orthogonal changes that happen to be really convenient to do simultaneously.

Were you hoping to implement a solution that precludes lower-level actors from even setting an error, and if so which one?

I'd like to eventually remove SetGoError and just have the various senders deal with boxing/unboxing the errors.

tamird added a commit that referenced this pull request Jul 17, 2015
@tamird tamird merged commit 45abf71 into cockroachdb:master Jul 17, 2015
@tbg tbg removed the PTAL label Jul 17, 2015
@tamird tamird deleted the return-replies-3 branch July 17, 2015 15:03
@tbg
Copy link
Copy Markdown
Member

tbg commented Jul 17, 2015

sounds good 👍

@bdarnell
Copy link
Copy Markdown
Contributor

LGTM

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