[
https://issues.apache.org/jira/browse/PHOENIX-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16794629#comment-16794629
]
Josh Elser commented on PHOENIX-5169:
-------------------------------------
[~Jaanai], good catch.
{code}
+ QueryLogger queryLogger = QueryLogger.getInstance(connection,
isSystemTable);
+ QueryLoggerUtil.logInitialDetails(queryLogger,
connection.getTenantId(), connection.getQueryServices(), sql, getParameters());
+ return queryLogger;
+ } else {
+ return null;
{code}
Could we return an "no-op" implementation of QueryLogger instead of returning
{{null}} when query logging is disabled? That would prevent us from
accidentally missing places we need to add null checks.
> Query logger is still initialized for each query when the log level is off
> --------------------------------------------------------------------------
>
> Key: PHOENIX-5169
> URL: https://issues.apache.org/jira/browse/PHOENIX-5169
> Project: Phoenix
> Issue Type: Bug
> Affects Versions: 5.0.0
> Reporter: jaanai
> Assignee: jaanai
> Priority: Major
> Fix For: 5.1
>
> Attachments: PHOENIX-5169-master-v2.patch, PHOENIX-5169-master.patch,
> image-2019-02-28-10-05-00-518.png
>
>
> we will still invoke createQueryLogger in PhoenixStatement for each query
> when query logger level is OFF, which has significant throughput impacts
> under multiple threads.
> The below is jstack with the concurrent query:
> !https://gw.alicdn.com/tfscom/TB1HC3bI4TpK1RjSZFMXXbG_VXa.png|width=500,height=400!
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)