Philip Zeyliger has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/12129


Change subject: IMPALA-6664: Tag log statements with fragment ids.
......................................................................

IMPALA-6664: Tag log statements with fragment ids.

[Work in progress.]

This is a partial implementation of the desire in IMPALA-6664 to tag all
log statements with their query ids. It re-uses the existing
ThreadDebugInfo infrastructure as well as the existing
InstallLogMessageListenerFunction() patch to glog (currently used for
log redaction) to prefix log messages with fragment ids, when available.
The fragment id is the query id with the last bits incremented, so
it's possible to correlate a given query.

I've used this to debug some crashes (of my own doing) while running
parallel tests, and it's been quite helpful.

The natural follow-up to this would be to tag coordinator threads with
their query id, to capture more log messages that are related to a
query.

An alternative would be to use Kudu's be/src/kudu/util/async_logger.h,
and add the "Listener" functionality to it directly. Another alternative
would be to re-write all the *LOG macros, but this is quite painful (and
presumably was rejected when log redaction was introduced).

TODO: there's no test here yet...

Change-Id: I6634ef9d1a7346339f24f2d40a7a3aa36a535da8
---
M be/src/common/logging.cc
1 file changed, 24 insertions(+), 4 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6634ef9d1a7346339f24f2d40a7a3aa36a535da8
Gerrit-Change-Number: 12129
Gerrit-PatchSet: 1
Gerrit-Owner: Philip Zeyliger <phi...@cloudera.com>

Reply via email to