Prepends fragment id, when available. If unavailable, looks for query id. If unavailable, prepends nothing.
| 60 | // Prepends fragment id, when available. If unavailable, looks |
| 61 | // for query id. If unavailable, prepends nothing. |
| 62 | void PrependFragment(string* s, bool* changed) { |
| 63 | impala::ThreadDebugInfo* tdi = impala::GetThreadDebugInfo(); |
| 64 | if (tdi != nullptr) { |
| 65 | for (const auto& id : { tdi->GetInstanceId(), tdi->GetQueryId() }) { |
| 66 | if (id == ZERO_UNIQUE_ID) continue; |
| 67 | s->insert(0, PrintId(id) + "] "); |
| 68 | if (changed != nullptr) *changed = true; |
| 69 | return; |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | // Manipulates log messages by: |
| 75 | // - Applying redaction rules (if necessary) |
no test coverage detected