« Return to Thread: Bug in DiskIndexLinkedList.java

Bug in DiskIndexLinkedList.java

by Chris Zeng :: Rate this Message:

Reply to Author | View in Thread

I use MapContainerImpl with IndexTypes.DISK_INDEX index type。Suppose I add for elements A, B, C, D by order, then I delete D. And then I delete B.After these operations, the indice is wrong.Because after I insert for elements, Indice is A->B->C->D. I delete D, then A->B-C。But notice in memory, last variable in DiskIndexLinkedList is not as same as file。The last's next points D. Then I delete B,codes in MapContainerImpl set A'next to C and C'prev to A and writes them back.Then error occurs. This is because when DiskIndexLinkedList find result is euqal to root or last, it's simplly return root or last,actually, if is root, DiskIndexLinkedList should update the content of root object(Can not simplly root = result). If it is last, DiskIndexLinkedList can use last = result to update the content of last.

 « Return to Thread: Bug in DiskIndexLinkedList.java