[kudu-CR] Add a RpcContext::RespondFailure() method

2016-07-12 Thread David Ribeiro Alves (Code Review)
David Ribeiro Alves has abandoned this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Abandoned

ok, abandoning this and opting for a RespondNoCache method. Will add it in the 
first patch where it's used.

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: abandon
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 21
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-07-12 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 21:

Build Started http://104.196.14.100/job/kudu-gerrit/2337/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 21
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-07-08 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 19:

Build Started http://104.196.14.100/job/kudu-gerrit/2256/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 19
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-07-08 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 18:

Build Started http://104.196.14.100/job/kudu-gerrit/2247/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 18
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-07-08 Thread David Ribeiro Alves (Code Review)
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

http://gerrit.cloudera.org:8080/3191

to look at the new patch set (#16).

Change subject: Add a RpcContext::RespondFailure() method
..

Add a RpcContext::RespondFailure() method

In the case of certain errors we use RpcContext::RespondSuccess() because
setting the error is call dependent and it was done on the call's request.
Since we'll be relying on the RpcContext to call the appropriate method
on the ResultTracker, on the common case, we'd still be marking these error
cases as successful RPCs whose results we keep. This is problematic for
various reasons, the main one being that if a client gets a transient error
back (e.g. the call was throttled) all subsequent attemtpts at the same
call will get the same result.

To avoid this we need to be able to flag that a call failed even if we don't
need anything else done to the response. To this goal this patch adds
RpcContext::RespondFailure(), which currently does nothing else besides
call RespondSuccess(), but will do so when the result tracker is integrated
in.

Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
---
M src/kudu/rpc/rpc_context.cc
M src/kudu/rpc/rpc_context.h
2 files changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/3191/16
-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 16
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-07-08 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 16:

Build Started http://104.196.14.100/job/kudu-gerrit/2238/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 16
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-07-06 Thread Todd Lipcon (Code Review)
Todd Lipcon has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 15:

(3 comments)

http://gerrit.cloudera.org:8080/#/c/3191/15/src/kudu/rpc/rpc_context.h
File src/kudu/rpc/rpc_context.h:

PS15, Line 88: uce
typo


PS15, Line 89: cl
typo


Line 91:   void RespondFailure();
I still think this would be less confusing if it were called 'RespondNoCache' 
to avoid having a _fourth_ confusing option for errors


-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 15
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: Yes


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-07-05 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 15:

Build Started http://104.196.14.100/job/kudu-gerrit/2161/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 15
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-30 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 14:

Build Started http://104.196.14.100/job/kudu-gerrit/2133/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 14
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-27 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 13: -Verified

Build Started http://104.196.14.100/job/kudu-gerrit/2022/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 13
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-27 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 13: -Verified

Build Started http://104.196.14.100/job/kudu-gerrit/2015/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 13
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-22 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 12:

Build Started http://104.196.14.100/job/kudu-gerrit/1962/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 12
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-20 Thread David Ribeiro Alves (Code Review)
David Ribeiro Alves has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 10: Verified+1

unrelated flake MasterTest.TestMasterMetadataConsistentDespiteFailures

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-20 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 10:

Build Started http://104.196.14.100/job/kudu-gerrit/1903/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-20 Thread David Ribeiro Alves (Code Review)
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

http://gerrit.cloudera.org:8080/3191

to look at the new patch set (#10).

Change subject: Add a RpcContext::RespondFailure() method
..

Add a RpcContext::RespondFailure() method

In the case of certain errors we use RpcContext::RespondSuccess() because
setting the error is call dependent and it was done on the call's request.
Since we'll be relying on the RpcContext to call the appropriate method
on the ResultTracker, on the common case, we'd still be marking these error
cases as successful RPCs whose results we keep. This is problematic for
various reasons, the main one being that if a client gets a transient error
back (e.g. the call was throttled) all subsequent attemtpts at the same
call will get the same result.

To avoid this we need to be able to flag that a call failed even if we don't
need anything else done to the response. To this goal this patch adds
RpcContext::RespondFailure(), which currently does nothing else besides
call RespondSuccess(), but will do so when the result tracker is integrated
in.

Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
---
M src/kudu/rpc/rpc_context.cc
M src/kudu/rpc/rpc_context.h
2 files changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/3191/10
-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 10
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-20 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 9:

Build Started http://104.196.14.100/job/kudu-gerrit/1898/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 9
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-20 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 8:

Build Started http://104.196.14.100/job/kudu-gerrit/1886/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 8
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-20 Thread Kudu Jenkins (Code Review)
Kudu Jenkins has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 7:

Build Started http://104.196.14.100/job/kudu-gerrit/1880/

-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 7
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: No


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-06-20 Thread David Ribeiro Alves (Code Review)
David Ribeiro Alves has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 6:

(2 comments)

bq. wonder whether it would be a clearer API to instead have a flag like 
context->DoNotCacheResponse(); which must be called in these cases? It gets a 
bit ugly that we have so many different "RespondFailure" code paths now

Yeah, I don't really understand the difference between the names for the 
unsuccessful Respond* methods the naming distinction seems forced and 
meaningless. IMO these should all have the same name, i.e. be overloads of each 
other, explaining in which cases we'd want to use each different overload.

Using context->DoNotCacheResponse() breaks the abstraction in the single-server 
rpc case. Even though this might not be ideal I'd still prefer the new:

"
... set the error
context->RespondFailure()
"

to the alternative:

"
... set the error.
context->DontCacheResponse();
context->RespondSuccess(); // ?
"

Not that the user of this API does not need to know that the response is the 
same whether RespondSuccess() and RespondFailure(), it still makes more sense 
to call context->RespondFailure() after we've just set an error on the response.

http://gerrit.cloudera.org:8080/#/c/3191/6/src/kudu/rpc/rpc_context.h
File src/kudu/rpc/rpc_context.h:

Line 84:   // Mark this call as failed but don't actually change the response.
> this isn't clear that it also responds -- "Mark as failed" doesn't have the
Done


Line 87:   // to mark the call as failed.
> would be good to explain what actual effect this has
Done


-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: Yes


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-05-30 Thread Todd Lipcon (Code Review)
Todd Lipcon has posted comments on this change.

Change subject: Add a RpcContext::RespondFailure() method
..


Patch Set 6:

(2 comments)

wonder whether it would be a clearer API to instead have a flag like 
context->DoNotCacheResponse(); which must be called in these cases? It gets a 
bit ugly that we have so many different "RespondFailure" code paths now

http://gerrit.cloudera.org:8080/#/c/3191/6/src/kudu/rpc/rpc_context.h
File src/kudu/rpc/rpc_context.h:

Line 84:   // Mark this call as failed but don't actually change the response.
this isn't clear that it also responds -- "Mark as failed" doesn't have the 
active verb "responds"


Line 87:   // to mark the call as failed.
would be good to explain what actual effect this has


-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 6
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: David Ribeiro Alves 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 
Gerrit-HasComments: Yes


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-05-24 Thread David Ribeiro Alves (Code Review)
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

http://gerrit.cloudera.org:8080/3191

to look at the new patch set (#4).

Change subject: Add a RpcContext::RespondFailure() method
..

Add a RpcContext::RespondFailure() method

In the case of certain errors we use RpcContext::RespondSuccess() because
setting the error is call dependent and it was done on the call's request.
Since we'll be relying on the RpcContext to call the appropriate method
on the ResultTracker, on the common case, we'd still be marking these error
cases as successful RPCs whose results we keep. This is problematic for
various reasons, the main one being that if a client gets a transient error
back (e.g. the call was throttled) all subsequent attemtpts at the same
call will get the same result.

To avoid this we need to be able to flag that a call failed even if we don't
need anything else done to the response. To this goal this patch adds
RpcContext::RespondFailure(), which currently does nothing else besides
call RespondSuccess(), but will do so when the result tracker is integrated
in.

Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
---
M src/kudu/rpc/rpc_context.cc
M src/kudu/rpc/rpc_context.h
2 files changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/3191/4
-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 4
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon 


[kudu-CR] Add a RpcContext::RespondFailure() method

2016-05-24 Thread David Ribeiro Alves (Code Review)
Hello Kudu Jenkins,

I'd like you to reexamine a change.  Please visit

http://gerrit.cloudera.org:8080/3191

to look at the new patch set (#2).

Change subject: Add a RpcContext::RespondFailure() method
..

Add a RpcContext::RespondFailure() method

In the case of certain errors we use RpcContext::RespondSuccess() because
setting the error is call dependent and it was done on the call's request.
Since we'll be relying on the RpcContext to call the appropriate method
on the ResultTracker, on the common case, we'd still be marking these error
cases as successful RPCs whose results we keep. This is problematic for
various reasons, the main one being that if a client gets a transient error
back (e.g. the call was throttled) all subsequent attemtpts at the same
call will get the same result.

To avoid this we need to be able to flag that a call failed even if we don't
need anything else done to the response. To this goal this patch adds
RpcContext::RespondFailure(), which currently does nothing else besides
call RespondSuccess(), but will do so when the result tracker is integrated
in.

Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
---
M src/kudu/rpc/rpc_context.cc
M src/kudu/rpc/rpc_context.h
2 files changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/91/3191/2
-- 
To view, visit http://gerrit.cloudera.org:8080/3191
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9f1387ba0f837046a8056e77f73a3982f06c73a2
Gerrit-PatchSet: 2
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: David Ribeiro Alves 
Gerrit-Reviewer: Adar Dembo 
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon