You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@impala.apache.org by "Huaisi Xu (Code Review)" <ge...@cloudera.org> on 2016/02/29 19:44:09 UTC

[Impala-CR](cdh5-2.2.0_5.4.x) IMPALA-3093: ReopenClient() could NULL out 'client_key' causing a crash

Hello Henry Robinson, Internal Jenkins, Silvius Rus, Tim Armstrong,

I'd like you to do a code review.  Please visit

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

to review the following change.

Change subject: IMPALA-3093: ReopenClient() could NULL out 'client_key' causing a crash
......................................................................

IMPALA-3093: ReopenClient() could NULL out 'client_key' causing a crash

When ReopenClient() calls CreateClient() and CreateClient() fails, it
sets 'client_key' to NULL. ReopenClient(), then on seeing that
CreateClient() has failed has to restore the old client key back to
the 'client_key' so that it doesn't remain NULL.

However, there was a bug in the logic which made 'old_client_key' and
'client_key' point to the same thing thereby effectively leaving
'client_key' permanently NULLed out (because even old_client_key got
NULLed out). This on use (mostly in DoRpc()), caused a crash.

This patch fixes the logic so that the correct old client key is
restored on a failure to CreateClient().

Change-Id: I16699534d5e48acfc2720f23e420d63af7bd2931
Reviewed-on: http://gerrit.cloudera.org:8080/2338
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Reviewed-by: Henry Robinson <he...@cloudera.com>
Reviewed-by: Silvius Rus <sr...@cloudera.com>
Tested-by: Internal Jenkins
(cherry picked from commit b45ad069d17967e977c2ad7a235655586046ead3)
---
M be/src/runtime/client-cache.cc
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala refs/changes/52/2352/1
-- 
To view, visit http://gerrit.cloudera.org:8080/2352
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16699534d5e48acfc2720f23e420d63af7bd2931
Gerrit-PatchSet: 1
Gerrit-Project: Impala
Gerrit-Branch: cdh5-2.2.0_5.4.x
Gerrit-Owner: Huaisi Xu <hx...@cloudera.com>
Gerrit-Reviewer: Henry Robinson <he...@cloudera.com>
Gerrit-Reviewer: Internal Jenkins
Gerrit-Reviewer: Sailesh Mukil <sa...@cloudera.com>
Gerrit-Reviewer: Silvius Rus <sr...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <ta...@cloudera.com>