puppetlabs/puppetdb — pull request #237 by cprice-puppet (2012-07-25 23:43:05+00:00)
Title: (#15696) First pass - introduce query limit for resource query

FOR REVIEW ONLY--just looking for general feedback on the pattern, etc.

At the very least this needs lots of docs, pre/post conditions, and tests
before it gets merged.

-----------------------------------------------------------------------------------------------------------

This commit introduces a new global setting "resource-query-limit",
which, if provided, will cause any resource queries to error out
if they would return more results than the value set for this
setting. This will provide users with a fail-safe mechanism
to ensure that they don't accidentally issue a huge query that
blows out the JVM heap space and leaves the puppetdb service
in an unstable state.

This commit is for initial review only; needs lots of docs and
tests.