Jira (PDB-5168) Log PQL parsing time whenever it's "too long"

15 views
Skip to first unread message

Rob Browning (Jira)

unread,
Jun 30, 2021, 2:30:03 PM6/30/21
to puppe...@googlegroups.com
Rob Browning created an issue
 
PuppetDB / Improvement PDB-5168
Log PQL parsing time whenever it's "too long"
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: PuppetDB
Created: 2021/06/30 11:29 AM
Priority: Normal Normal
Reporter: Rob Browning

It appears that the PQL parser can go off the rails, and it might even be a known, more general issue: https://stackoverflow.com/questions/64165847/unbelievably-bad-parse-time

For now, so we can get a better impression of the scope of the problem, let's compute the PQL parse time and log it at warning level whenever it's greater than say 1 second.  (Not sure about 1s, but we can determine the exact value before we merge.)

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.13.2#813002-sha1:c495a97)
Atlassian logo

Austin Blatt (Jira)

unread,
Jun 30, 2021, 2:33:02 PM6/30/21
to puppe...@googlegroups.com
Austin Blatt commented on Improvement PDB-5168
 
Re: Log PQL parsing time whenever it's "too long"

Here's an example of a pql query with 1,600 certnames that takes a long time to compile on the repl.

=> (require '[puppetlabs.puppetdb.pql :as pql] :reload-all)
=> (do (time (pql/parse-pql-query (str "nodes[] { certname in [\"" (clojure.string/join "\", \"" (repeat 1600 "heavy-empire.delivery.puppetlabs.net")) "\"] }" ))) nil)
"Elapsed time: 20993.829089 msecs"

Oana Tanasoiu (Jira)

unread,
Jul 14, 2021, 3:30:02 AM7/14/21
to puppe...@googlegroups.com
Oana Tanasoiu updated an issue
 
Change By: Oana Tanasoiu
Sprint: ready for triage 2

Oana Tanasoiu (Jira)

unread,
Jul 14, 2021, 3:30:03 AM7/14/21
to puppe...@googlegroups.com

Oana Tanasoiu (Jira)

unread,
Jul 14, 2021, 3:45:04 AM7/14/21
to puppe...@googlegroups.com
Oana Tanasoiu updated an issue
Change By: Oana Tanasoiu
Sprint: ready for triage 2 ghost-28.07.2021

Oana Tanasoiu (Jira)

unread,
Jul 14, 2021, 4:55:02 AM7/14/21
to puppe...@googlegroups.com

Austin Blatt (Jira)

unread,
Aug 19, 2021, 2:00:03 PM8/19/21
to puppe...@googlegroups.com
Austin Blatt updated an issue
Change By: Austin Blatt
Fix Version/s: PDB 7.5.2
Fix Version/s: PDB 6.18.2
Reply all
Reply to author
Forward
0 new messages