PDB 1.6: Queries filtering facts with large values might fail
22 views
Skip to first unread message
ak0ska
unread,
Oct 15, 2014, 7:15:42 AM10/15/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to puppet...@googlegroups.com
Hello,
We are running PuppetDB 1.6.0. We have fact 'a' in puppetdb that has large numbers occasionally, such as 2930266584. When we launch a query /v3/facts/a with filter '["<", "value", 1950341121]' it returns code 200 with an empty body, while puppetdb.log shows a new error:
2014-10-15 11:20:41,293 ERROR [clojure-agent-send-off-pool-15310] [v3.facts] Error streaming response org.postgresql.util.PSQLException: ERROR: value "2930266584" is out of range for type integer
The table stores values in strings, and apparently the query cannot convert large values into integers. Could someone please check if this issue also exists with newer versions?
Best regards, Akos Hencz
Ken Barber
unread,
Oct 15, 2014, 7:36:49 AM10/15/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Puppet Users
In future versions the coercement is gone and types are supported. So
in this case to do something similar you must be using structured
facts and you must store the values as integers, they get stored in a
big int column, and the comparison will be uncoerced. Only signed big
int is supported today, there is no support for arbitrary precision
decimals.
ken.
ak0ska
unread,
Oct 15, 2014, 7:41:50 AM10/15/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message