Jira QueryDSL framework doesn't log SQL statements when logging enabled

XMLWordPrintable

    • 7.02
    • 1
    • Severity 2 - Major
    • 0

      Summary

      In Jira you can enable SQL logging for all DB operations: [ Administration > System > Logging and profiling > SQL Logging > Enable the SQL log ]
      That allows you to see SQL statements produced by Jira methods before execution and also response time.
      After switching part of the code to use QueryDSL framework, this logging is no longer present. So there is no way to track the SQL generated by new methods.

      Expected Results

      Logging similar to OfBiz in atlassian-jira-sql.log file

      2017-11-13 16:45:40,502 http-nio-8081-exec-22 admin 1005x4181x1 czyhc8 /rest/hipchat/integrations/1.0/issuepanel/data/AG-10 1ms "SELECT ID, LINKTYPE, SOURCE, DESTINATION, SEQUENCE FROM public.issuelink WHERE DESTINATION='11101'"
      2017-11-13 16:45:40,502 http-nio-8081-exec-22 admin 1005x4181x1 czyhc8 /rest/hipchat/integrations/1.0/issuepanel/data/AG-10 call stack
              ...
              at com.atlassian.jira.entity.SelectQueryImpl$ExecutionContextImpl.forEach(SelectQueryImpl.java:227)
              at com.atlassian.jira.entity.SelectQueryImpl$ExecutionContextImpl.asList(SelectQueryImpl.java:164)
              at com.atlassian.jira.issue.link.DefaultIssueLinkManager.getLinks(DefaultIssueLinkManager.java:335)
              at com.atlassian.jira.issue.link.DefaultIssueLinkManager.lambda$new$1(DefaultIssueLinkManager.java:77)
              at com.atlassian.jira.cache.request.RequestCacheImpl.get(RequestCacheImpl.java:42)
              at java.util.Optional.map(Optional.java:215)
              at com.atlassian.jira.issue.link.DefaultIssueLinkManager.getInwardLinks(DefaultIssueLinkManager.java:327)
              at com.atlassian.jira.config.DefaultSubTaskManager.getParentIssueId(DefaultSubTaskManager.java:288)
      

      Actual Results

      No logging in the atlassian-jira-sql.log file

      Notes

      • Normally logging done by com.atlassian.jira.ofbiz.LoggingSQLInterceptor

      Workaround

      None

            Assignee:
            Unassigned
            Reporter:
            Andriy Yakovlev [Atlassian]
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: