Open Bug 527037 Opened 15 years ago Updated 2 months ago

Search.pm does not use the central bug visibility mechanism

Categories

(Bugzilla :: Query/Bug List, defect)

defect
Not set
normal

Tracking

()

People

(Reporter: gerv, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Bugzilla->user->visible_bugs is the central place for checking bug visibility.
buglist.cgi does not use it. It probably should. 

Of course, performance is more important here than in most places, so instead of ripping the visibility check out of the main query and adding it afterwards, we may want to keep the basic check in the main query (in order to keep the number of returned bugs down) and do an extra check afterwards. I don't know. My attached suggested patch uses this approach - it leaves the existing query alone but further filters the list of returned bugs through the visibility function.

Gerv
Attached patch Patch v.1Splinter Review
One way of doing it. The final patch wouldn't have my name in the comment.

Gerv
Assignee: query-and-buglist → gerv
Status: NEW → ASSIGNED
Attachment #410811 - Flags: review?(mkanat)
Blocks: bz-bugperm
Comment on attachment 410811 [details] [diff] [review]
Patch v.1

No, that could result in an IN() clause with 10000 bugs IDs in it, which is likely to perform terribly.

I think the eventual solution to this is:

1) We make Search.pm return bug objects.

2) We allow visible_bugs to wrap a subselect.

3) We wrap the select that does the search in the visible_bugs code.

I suspect that databases will optimize that better, but I could be wrong.

It's also entirely possible that an IN() clause with 10,000 or 50,000 ids isn't even a problem (though on Oracle it would be quite a lot of SQL). But even just the weight of sending that query to the server and running it through the query optimizer would seem like a possible issue, to me (particularly in situations like Mozilla where the database server is a separate server).
Attachment #410811 - Flags: review?(mkanat) → review-
Summary: buglist.cgi does not use the central bug visibility mechanism → Search.pm does not use the central bug visibility mechanism
Assignee: gerv → query-and-buglist
Status: ASSIGNED → NEW
Attachment #9387341 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: