Closed andrei-m closed 8 years ago
Hi @andrei-m
Thanks for the bug report! And really sorry for the response delay, these last weeks have been quite intense here. I'm gonna dig into it. Do you already have clues on how to fix it? (I really really love Pull Requests ;) )
was this fixed? considering using lane in https://github.com/jbenet/go-ipfs
Not yet unfortunately :-)
I'll give it a shot tonight and keep you updated accordingly!
Better later than never. I've spotted a huge bug in the binary heap implementation. It has been fixed by the commit caccc29 and I have improved testing + added concurrent insertion/pop tests.
Let me know if it fixes the problem for you guys.
Sorry for the huge delay!
No replies. Considering it fixed. Closing.
If a min priority queue contains three or more elements with the same priority,
Head()
andPop()
return an unexpected result. e.g."a", "b" and "c" are pushed onto the queue with the same priority (2). "d" is pushed on with a higher priority according to the min-priority queue, so I expect it to become the head. Instead, "a" is returned. The queue behaves correctly if one of the elements with priority 2 is removed.
go version go1.2.2 darwin/amd64