impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henry Robinson (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-4889: Use client sidecars for Thrift RPCs
Date Thu, 30 Mar 2017 18:27:40 GMT
Henry Robinson has posted comments on this change.

Change subject: IMPALA-4889: Use client sidecars for Thrift RPCs
......................................................................


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/6473/1/be/src/rpc/rpc.h
File be/src/rpc/rpc.h:

Line 169:     int idx = -1;
> what's undefined about it?
Hm, looks like compilers won't warn in this case (I thought they'd be more conservative),
but turns out:

  void t(int* p) { }
  int foo() {
    int i;
    t(&i);
    if (i) { }
  }

doesn't give a warning even though i is uninitialized (whereas if you omit the call to t(),
it does). 

Long story short, I removed the initialization.


Line 179:     RETURN_IF_ERROR(DeserializeThriftMsg(sidecar.data(), &len, true, resp));
> how long is sidecar.data() valid?
As long as the controller_ object is valid, so as long as the Rpc is valid (which is usually
not very long after this method returns).


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I0fcc87c6b67aa167d70ae022663b14bc90261c95
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Henry Robinson <henry@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>
Gerrit-HasComments: Yes

Mime
View raw message