summaryrefslogtreecommitdiff
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorSteven Danna <steve@chef.io>2017-07-31 01:13:38 +0100
committerSteven Danna <steve@chef.io>2017-07-31 09:10:21 +0100
commit5b4f08e1c6fc83a12b896b3949676ceff6436f52 (patch)
tree17f3162e94ab68a4c45a2f65deeda48bbebef4c9 /CONTRIBUTING.md
parent82b3157c671835c00bcf68772c8b3563e5db6e26 (diff)
downloadchef-5b4f08e1c6fc83a12b896b3949676ceff6436f52.tar.gz
Set explicit page size for every search requestssd/always-forward
The previous code would advance the search start parameter by either the user-provided rows parameter or (as a fallback) the number of rows returned in that page. Most code that calls the search() function does not set rows, so the fallback is used often. Since the search index may have stale results, it is possible to get responses with a completely empty page. For example: { "start": 0, "total": 1, "rows": [] } In this case, if no rows parameter was passed, the search function would infinitely recurse (eventually running out of stack). To avoid this, we set rows to 1000 if no user-provided value was set. This is the default page size of Chef Server so for most users it will not be changing the default behavior. Signed-off-by: Steven Danna <steve@chef.io>
Diffstat (limited to 'CONTRIBUTING.md')
0 files changed, 0 insertions, 0 deletions