Closed (fixed)
Project:
Apache Solr Search
Version:
6.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
13 Mar 2009 at 13:39 UTC
Updated:
1 Apr 2009 at 20:40 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mkalkbrennerI ran into this bug too while I was working on this new feature: #401234: Reflect hierarchical taxonomy vocabulary in facet
The problem is located in Solr_Base_query.php. There is a static counter in method add_field which cause the issue if the query gets cloned.
Cloning a query object happens in facet blocks. So in this case you don't add but overwrite a field if you click on a facet link.
I attached a patch that fixes this issue.
Comment #2
mkalkbrennerComment #3
Anonymous (not verified) commentedI had occasionally seen this behavior, but hadn't had the time to investigate.
I'll help check this patch out, hopefully today.
Comment #4
pwolanin commentedI don't really see why this is happening, but the patch looks reasonable.
Comment #5
Anonymous (not verified) commentedTested the patch and it seems to have corrected the problem without introducing any new issues.
Comment #6
JacobSingh commentedheh, okay we know why Robert had the microtime() now.
I think his reason was something to do with the breadcrumb order? I really don't remember, but this is getting a bit ugly.
Otherwise, the patch looks reasonable to me, although I imagine there is some hidden problem here, I think we can commit it, it shouldn't be any worse.
Let's think also about ways to do this without cloning... Cloning is typically a source of memory leaks and ugly scoping issues like this.
Comment #7
pwolanin commentedwell, cloning is really the right solution - we need to start fresh each loop
Comment #8
pwolanin commentedcommitted to 6.x - thanks.