|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
Bug in DiskIndexLinkedList.javaI 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.
|
|
|
Re: Bug in DiskIndexLinkedList.javaHi Chris,
can you provide a test case and attach it to a jira issue ? http:// issues.apache.org/activemq/browse/AMQ cheers, Rob http://open.iona.com/ -Enterprise Open Integration http://rajdavies.blogspot.com/ On Nov 26, 2007, at 7:13 AM, Chris Zeng wrote: > > 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. > -- > View this message in context: http://www.nabble.com/Bug-in- > DiskIndexLinkedList.java-tf4873351s2354.html#a13944775 > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. > |
|
|
Re: Bug in DiskIndexLinkedList.javaI raised an issue to track this: https://issues.apache.org/activemq/
browse/AMQ-1502 On Nov 26, 2007, at 7:13 AM, Chris Zeng wrote: > > 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. > -- > View this message in context: http://www.nabble.com/Bug-in- > DiskIndexLinkedList.java-tf4873351s2354.html#a13944775 > Sent from the ActiveMQ - Dev mailing list archive at Nabble.com. > |
| Free embeddable forum powered by Nabble | Forum Help |