This is an automated email from the ASF dual-hosted git repository.
siddteotia pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new dfc84a529b Refactor logging for query killing (#10262)
dfc84a529b is described below
commit dfc84a529b5b5b3fbfd3a9b8884249478f5d54e0
Author: Jia Guo <[email protected]>
AuthorDate: Fri Feb 10 10:23:27 2023 -0800
Refactor logging for query killing (#10262)
* Refactor logging for query killing
* Refactor logging for query killing
---
.../core/accounting/CPUMemThreadLevelAccountingObjects.java | 9 +++++++++
.../pinot/core/accounting/PerQueryCPUMemAccountantFactory.java | 2 ++
2 files changed, 11 insertions(+)
diff --git
a/pinot-core/src/main/java/org/apache/pinot/core/accounting/CPUMemThreadLevelAccountingObjects.java
b/pinot-core/src/main/java/org/apache/pinot/core/accounting/CPUMemThreadLevelAccountingObjects.java
index 167735acad..431643942a 100644
---
a/pinot-core/src/main/java/org/apache/pinot/core/accounting/CPUMemThreadLevelAccountingObjects.java
+++
b/pinot-core/src/main/java/org/apache/pinot/core/accounting/CPUMemThreadLevelAccountingObjects.java
@@ -52,6 +52,15 @@ public class CPUMemThreadLevelAccountingObjects {
// will put preemption reasons in this for the killed thread to pickup
AtomicReference<Exception> _errorStatus = new AtomicReference<>();
+ @Override
+ public String toString() {
+ TaskEntry taskEntry = _currentThreadTaskStatus.get();
+ return "ThreadEntry{"
+ + "_currentThreadTaskStatus=" + (taskEntry == null ? "idle" :
taskEntry.toString())
+ + ", _errorStatus=" + _errorStatus
+ + '}';
+ }
+
/**
* set the thread tracking info to null and usage samples to zero
*/
diff --git
a/pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java
b/pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java
index dff291452c..ee0487e5c3 100644
---
a/pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java
+++
b/pinot-core/src/main/java/org/apache/pinot/core/accounting/PerQueryCPUMemAccountantFactory.java
@@ -774,6 +774,7 @@ public class PerQueryCPUMemAccountantFactory implements
ThreadAccountantFactory
LOGGER.error("Query {} got picked because using {} ns of cpu time,
actual kill committed {}",
maxUsageTuple._allocatedBytes, maxUsageTuple._queryId,
_oomKillQueryEnabled);
}
+ LOGGER.error("Current task status recorded is {}", _threadEntriesMap);
LOGGER.error("Query aggregation results {} for the previous kill.",
_aggregatedUsagePerActiveQuery.toString());
}
@@ -789,6 +790,7 @@ public class PerQueryCPUMemAccountantFactory implements
ThreadAccountantFactory
interruptRunnerThread(value.getAnchorThread());
}
}
+ LOGGER.error("Current task status recorded is {}", _threadEntriesMap);
}
private void interruptRunnerThread(Thread thread) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]