rtreego icon indicating copy to clipboard operation
rtreego copied to clipboard

Invalid data in tree after Inserting

Open codpe opened this issue 7 years ago • 1 comments

I think there is a bug. I tried bulk load, then deleting every 2nd element, and inserting back all elements deleted. After that there are several copies of some elements and some are missing. https://gist.github.com/codpe/c4b9ad39b91e4a79ab4647432b01bcca

I managed to find out, that this append sometimes changes entities in at least 2 nodes. https://github.com/dhconnelly/rtreego/blob/3fb2815d35b271e8c46328dbd6ca22f548ceb6dc/rtree.go#L254 I think it is somehow connected with the thing that several slices can point to same array

codpe avatar Sep 23 '18 15:09 codpe

I've never heard of this in five years of usage by thousands of developers, but that surely just means that it's a very tricky issue that will require careful debugging. I haven't maintained this library in a nontrivial way in a long time and I'm no longer prepared to look into this, but if you can identify what about the slice usage is wrong, I'd be very grateful to accept a pull request!

dhconnelly avatar Oct 27 '18 19:10 dhconnelly

I think this has been resolved by the linked PR - closing, but please re-open if you see this again!

dhconnelly avatar Aug 25 '22 02:08 dhconnelly