Issue Details (XML | Word | Printable)

Key: LUCENE-670
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Critical Critical
Assignee: Unassigned
Reporter: Ken Geis
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Lucene - Java

improper isolation (overuse of system properties) allows Lucene apps to clobber each other

Created: 08/Sep/06 12:31 AM   Updated: 18/Sep/06 09:43 PM
Return to search
Component/s: Index, Store
Affects Version/s: 1.9, 2.0.0
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Tomcat
Issue Links:
Incorporates
 

Resolution Date: 08/Sep/06 05:31 PM


 Description  « Hide
As nicely stated by the Javadoc for org.apache.commons.discovery.tools.ManagedProperties, "System properties are global in nature, so using them easily violates sound architectural and design principles for maintaining separation between components and runtime environments." Lucene's use of system properties makes it so that one web application that uses Lucene can break another web application that uses Lucene.

Both org.apache.lucene.index.SegmentReader and org.apache.lucene.store.FSDirectory use system properties to locate an implementation class. Because of this, two applications can step on each others' toes.

So, I have two webapps running in Tomcat. One uses the Compass Framework which sets the SegmentReader implementation class to org.apache.lucene.index.CompassSegmentReader. My other webapp tries to initialize SegmentReader in a different classloader, and it fails with an ExceptionInInitializerError because it can't load that class. If I get lucky, the non-Compass webapp loads first and things run smoothly.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Hoss Man added a comment - 08/Sep/06 12:42 AM
This appears to be the same issue as LUCENE-636.

Ken: if you could take a look at that issue (and the associated patch), and indicate wether it addresses your concerns (in which case this issue should be marked a dup) or not (in which case please clarify what other problems you see not already described/addressed by that issue.

feel free to vote for LUCENE-636 as well to raise it's visibility.


Ken Geis added a comment - 08/Sep/06 05:23 PM
I guess I didn't search well enough for a previously submitted bug.

LUCENE-636 addresses my concerns and the patch is coded very close to how I had it in my head.

Please mark this as a duplicate of LUCENE-636. (It doesn't appear that I have permission to do so.)