Closed Bug 365082 Opened 18 years ago Closed 17 years ago

QuickSearch using unknown field makes Bugzilla hang

Categories

(Bugzilla :: Query/Bug List, defect, P4)

2.23.3
defect

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: jruderman, Assigned: wicked)

References

Details

(Keywords: regression)

Attachments

(1 file)

Bugzilla never gives me results for https://bugzilla.mozilla.org/buglist.cgi?quicksearch=foo%3Abar.  I'm guessing it's either trying to return all the bugs in bmo or it hit an infinite loop.
Marc, could you have a look? foo:bar should either be ignored, or be seen as "foo:bar" (in which case it shouldn't be slower than any other request).
OS: Mac OS X 10.3 → All
Hardware: Macintosh → All
Version: unspecified → 2.23.3
When QuickSearch was client-side, foo:bar was treated as an error.  I think that behavior is better, because you get useful feedback if you typo or mis-abbreviate a field name.
Target Milestone: --- → Bugzilla 3.0
Indeed, unknown fields are now ignored so that quicksearch will try to fetch all open bugs. We should change this back to throwing an error but allow quoting to be used to make it normal search word. This way |foo:bar| will throw an error but |"foo:bar"| will do normal quicksearch for the foo:bar word.
Assignee: query-and-buglist → wicked+bz
I wonder if shadow DB replication may lag behind due to this bug.
Flags: blocking3.0?
Not a blocker, but something we should fix for 3.0 or 3.0.1. I haven't seen significant DB lag--quicksearch only reads, it doesn't write. (So it shouldn't prevent replication.)
Flags: blocking3.0? → blocking3.0-
Priority: -- → P4
This changes logic back to throw an user error if there are any unknown fields. Quoting can already be used to make such words normal search words.
Attachment #272970 - Flags: review?(LpSolit)
Comment on attachment 272970 [details] [diff] [review]
Throw user error, V1

>Index: Bugzilla/Search/Quicksearch.pm

>+        if (scalar(@unknownFields) > 0) {

Nit: |> 0| is optional.



>Index: template/en/default/global/user-error.html.tmpl

>+    [% IF fields.unique.size == 1 %]
>+    Field <code>[% fields.first FILTER html %]</code> is not a known field.
>+    [% ELSE %]

Nit: indentation!


>+    The legal field names are <a href="page.cgi?id=quicksearchhack.html">are
>+    listed here</a>.

Nit: 'are' appears twice in the sentence. The one enclosed in the link should be removed.


Your patch is working fine on both 3.0 and 3.1, and the nits can be fixed on checkin. r=LpSolit
Attachment #272970 - Flags: review?(LpSolit) → review+
Status: NEW → ASSIGNED
Flags: approval3.0+
Flags: approval+
tip:

Checking in Bugzilla/Search/Quicksearch.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search/Quicksearch.pm,v  <--  Quicksearch.pm
new revision: 1.17; previous revision: 1.16
done
Checking in template/en/default/global/user-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v  <--  user-error.html.tmpl
new revision: 1.218; previous revision: 1.217
done


3.0:

Checking in Bugzilla/Search/Quicksearch.pm;
/cvsroot/mozilla/webtools/bugzilla/Bugzilla/Search/Quicksearch.pm,v  <--  Quicksearch.pm
new revision: 1.12.2.2; previous revision: 1.12.2.1
done
Checking in template/en/default/global/user-error.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/user-error.html.tmpl,v  <--  user-error.html.tmpl
new revision: 1.204.2.4; previous revision: 1.204.2.3
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: