SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-300
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Chris Cottee
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Compass

Concurrent modification and querying of one object can cause it to appear twice in CompassHits

Created: 23/Oct/06 03:17 PM   Updated: 25/Oct/06 05:35 AM
Component/s: Compass::Core
Affects Version/s: 1.0.0, 1.0.1, 1.1 M1, 1.1 M2
Fix Version/s: 1.1 M3

File Attachments: 1. Java Source File CompassTest.java (4 kB)
2. XML File Tobesearched.cpm.xml (0.6 kB)
3. Java Source File ToBeSearched.java (0.7 kB)



 Description  « Hide
If you query and mutate an object in two different threads then sometimes you will get the same object twice in the CompassHits ,it is the same object instance. This happens with a transaction isolation level of ReadCommitted.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Chris Cottee added a comment - 23/Oct/06 03:20 PM
I have attached a junit test which demonstrates getting the same object twice.

Shay Banon added a comment - 23/Oct/06 03:33 PM
The bug happens because of the order of flushing deletes and writing the segment file. Another note, in CompassTest, the search should use findWithDetach and not just find.

Shay Banon added a comment - 23/Oct/06 04:29 PM
Ok, I have fixed it both in 1.1 M3, and 1.0 branch. Have ran the tests (actually added a variation to Compass unit tests) and they pass. Can you give 1.1 M3 SNAPSHOT a go, and verify that it is fixed as well?

Chris Cottee added a comment - 25/Oct/06 04:31 AM
Hi,
we tested the 1.1 M3 SNAPSHOT as of 24th Oct and it is fixed. Thanks !
Chris