History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: COR-1097
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Blocker Blocker
Assignee: Patrick Roemer
Reporter: Patrick Roemer
Votes: 0
Watchers: 0
Operations

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

Corrupted class index in some delete/re-add scenarios

Created: 15/Jan/08 06:20 PM   Updated: 23/Jan/08 03:25 PM
Component/s: None
Affects Version/s: 7.0.25
Fix Version/s: 7.1.26

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0h
Time Spent - 15h
Time Spent: 15h
Time Spent - 15h

File Attachments: 1. Java Source File RepeatDeleteReaddTestCase.java (3 kb)


Peers: Andrew Zhang and Rodrigo B. de Oliveira
Order: 3
Original IDS Estimate: 4 IDS
Resolution Date: 23/Jan/08 03:25 PM
First Response Date: 16/Jan/08 11:57 AM
Labels:
Participants: Andrew Zhang, Patrick Roemer and Rodrigo B. de Oliveira
Number of Attachments: 1
Number of Comments: 6


 Description  « Hide
When deleting and re-adding objects to a database, subsequent queries (constrained against the extent only) may not find all objects. The results are somewhat erratic: The number of found objects may vary on different runs, etc.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Patrick Roemer - 15/Jan/08 06:27 PM
The attached test case should be expected to generate the following output on each loop execution:

class com.db4o.db4ounit.common.defragment.RepeatDeleteReaddTestCase$ItemA/10
class com.db4o.db4ounit.common.defragment.RepeatDeleteReaddTestCase$ItemB/10

The actual output is something like:

class com.db4o.db4ounit.common.defragment.RepeatDeleteReaddTestCase$ItemA/10
class com.db4o.db4ounit.common.defragment.RepeatDeleteReaddTestCase$ItemB/10
class com.db4o.db4ounit.common.defragment.RepeatDeleteReaddTestCase$ItemA/10
class com.db4o.db4ounit.common.defragment.RepeatDeleteReaddTestCase$ItemB/10
class com.db4o.db4ounit.common.defragment.RepeatDeleteReaddTestCase$ItemA/8
! db4ounit.AssertionException: Expected '10' but was '8'

(The position where the failure occurs may vary in between runs.)

Rodrigo B. de Oliveira - 16/Jan/08 11:57 AM
And the more the CPU load the bigger the probability it finishes green.

Andrew Zhang - 18/Jan/08 10:27 AM
The test passes against Apache Harmony and JRockit.
Looks like a bug of SUN jre.
ObjectReference id_add(ObjectReference newRef) {
  newRef._idPreceding = null; // looks like these two lines are not executed.
  newRef._idSubsequent = null; // looks like these two lines are not executed.
  newRef._idSize = 1;
  return id_add1(newRef);
 }


Andrew Zhang - 18/Jan/08 02:51 PM
The root node is not correctly initialized.

Patrick Roemer - 22/Jan/08 02:27 PM
Needs to be ported back to production branch.

Patrick Roemer - 23/Jan/08 02:32 PM
Ported back to 6.4