Closed Bug 523957 Opened 15 years ago Closed 15 years ago

Admin search returns too much when restricted to a single ID

Categories

(addons.mozilla.org Graveyard :: Search, defect, P4)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: clouserw, Assigned: davedash)

References

()

Details

Attachments

(3 files, 1 obsolete file)

Attached image screenshot
The screenshot explains better than I can here, but when we search for an add-on id surrounded by brackets it should only return that 1 add-on. It's somehow matching others too.  I guess this has to do with the sphinx switch.
Attached image screenshot2
Oh, this might be a bigger problem too
Odd... I wonder if by the time you type [220 (4 chars) it's already begun to search.

Should be easy to fix.
Um... that second screenshot is alarming...
adding this to the 5.3 milestone, it'll be easier to fix while it's fresh in my head.
Status: NEW → ASSIGNED
Priority: -- → P4
Target Milestone: --- → 5.3
Component: Admin/Editor Tools → Search
(In reply to comment #4)
> adding this to the 5.3 milestone, it'll be easier to fix while it's fresh in my
> head.

Kicking out of 5.3, but feel free to make a patch while we're in code freeze. :)
Target Milestone: 5.3 → 5.4
Attached patch {} (obsolete) — Splinter Review
{} {}
  |
\---/

needed a bracket or an else or some piece of code.  I had an else statement laying around, so I just used that.
Attachment #414385 - Flags: review?(clouserw)
Comment on attachment 414385 [details] [diff] [review]
{}

That does fix the first problem.  I can still get the OOM error searching for [1865]
Attachment #414385 - Flags: review?(clouserw) → review+
I never got the OOM in the screenshot, so it works for me... I can't imagine why a single query would run out of memory... marking fixed.

------------------------------------------------------------------------
r56827 | ddash@mozilla.com | 2009-11-24 16:57:41 -0800 (Tue, 24 Nov 2009) | 2 li

[bug 523957] Added some brackets to make sure we only lookup by addon id if ther
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
addon id 1865 is Adblock Plus 1.1.1 
addon id 4042 is Adblock Plus Filter Uploader 1.7.1 

searching for [4042] gives addon with id 4042 - correct
searching for [1865] gives addon with id 4042 - incorrect

reopening...
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
(In reply to comment #9)
> addon id 1865 is Adblock Plus 1.1.1 
> addon id 4042 is Adblock Plus Filter Uploader 1.7.1 
> 
> searching for [4042] gives addon with id 4042 - correct
> searching for [1865] gives addon with id 4042 - incorrect
> 
> reopening...

That's not what is happening.  You're typing "[1865" which sends an ajax requests and gets back 4042 - this doesn't really matter, since you haven't typed the last "]" yet.  Once you do type that last "]" it sends a second ajax request which just spins because the server is running out of memory (my screenshot above).  It looks like 4042 to you just because the server never returns a different answer so that result is still there.
Attached patch []Splinter Review
Using a different method to grab the single addon.

Also displaying the memcache stuff below the screen with the other logs, as not to screw up AJAX requests (Which can supress them) or regular pages (which give warnings for inability to output headers).
Attachment #414385 - Attachment is obsolete: true
Attachment #415243 - Flags: review?(clouserw)
Attachment #415243 - Flags: review?(clouserw) → review+
Deleted branch 523957-oom (was 2aecd08).
host-4-118:~/Projects/Addons/code% git svn log                         (master)
------------------------------------------------------------------------
r57069 | ddash@mozilla.com | 2009-11-30 16:13:03 -0800 (Mon, 30 Nov 2009) | 2 li

[bug 523957] Moved some memache notices into the appcontroller log so it can be
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: