Admin search returns too much when restricted to a single ID

VERIFIED FIXED in 5.4

Status

addons.mozilla.org Graveyard
Search
P4
normal
VERIFIED FIXED
8 years ago
2 years ago

People

(Reporter: clouserw, Assigned: davedash)

Tracking

unspecified

Details

(URL)

Attachments

(3 attachments, 1 obsolete attachment)

(Reporter)

Description

8 years ago
Created attachment 407856 [details]
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.
(Reporter)

Comment 1

8 years ago
Created attachment 407858 [details]
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
(Reporter)

Comment 5

8 years ago
(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
Created attachment 414385 [details] [diff] [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)
(Reporter)

Comment 7

8 years ago
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
Last Resolved: 8 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 → ---
(Reporter)

Comment 10

8 years ago
(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.
Created attachment 415243 [details] [diff] [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)
(Reporter)

Updated

8 years ago
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
Last Resolved: 8 years ago8 years ago
Resolution: --- → FIXED
Verified FIXED on https://preview.addons.mozilla.org/en-US/admin/addons
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.