Limit the total number of results that a search can ever return

RESOLVED FIXED in Bugzilla 4.2

Status

()

P1
enhancement
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: mkanat, Assigned: mkanat)

Tracking

(Blocks: 1 bug)

Bugzilla 4.2
Dependency tree / graph
Bug Flags:
approval +

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
One frequently-reported problem is that you can do searches that return so many bugs that the search never actually completes.

The simplest solution to this is to set a maximum upper bound for how many results a search can return.

I'm going to do some testing to see how quickly Bugzilla returns certain numbers of results (to see where a timeout would start happening) but I suspect a safe value for this would be 10,000 or 20,000 results.
(Assignee)

Updated

8 years ago
Blocks: 632718
(Assignee)

Updated

8 years ago
Blocks: 632690

Comment 1

8 years ago
dupe of bug 535571?
(Assignee)

Comment 2

8 years ago
(In reply to comment #1)
> dupe of bug 535571?

  Ah, no, not quite. This bug here specifies a hard limit that will always be in place, that other bug just allows Search.pm to understand "limit" and "offset" instead of those being set manually in buglist.cgi.
(Assignee)

Comment 3

8 years ago
Created attachment 513835 [details] [diff] [review]
v1

I've tested this and it works.

LpSolit: This adds a new parameter, but it's a search-related parameter, so I feel that it falls within my Search.pm ownership. If you have some better suggestion around the parameter, though, I'm totally happy to make an adjustment to this patch after checkin.
Assignee: query-and-buglist → mkanat
Status: NEW → ASSIGNED
Attachment #513835 - Flags: review+
(Assignee)

Updated

8 years ago
Flags: approval+
(Assignee)

Comment 4

8 years ago
Committing to: bzr+ssh://bzr.mozilla.org/bugzilla/trunk/
modified report.cgi
modified Bugzilla/Search.pm
modified Bugzilla/Config/Query.pm
modified template/en/default/admin/params/query.html.tmpl
Committed revision 7722.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED

Comment 5

8 years ago
(In reply to comment #3)
> LpSolit: This adds a new parameter, but it's a search-related parameter, so I
> feel that it falls within my Search.pm ownership.

I wouldn't say that adding or removing a parameter falls within anyone's ownership. But I looked at your patch and I'm fine with it.
You need to log in before you can comment on or make changes to this bug.