Closed nikolaydimitrov closed 1 month ago
Thank you, Nikolay. I merged it. I'm looking for someone who is interested in taking over maintenance of this repository.
On Wed, Oct 23, 2024 at 4:28 AM Nikolay Dimitrov @.***> wrote:
In an edge case, on load, we found that it is possible to have the first segment being empty (size()==0) and also complete (reached q.config.ItemsPerSegment limit). In such queue, the Peek() and Deque() return error 'empty', but that is not correct as the queue has another segment with available objects.
You can view, comment on, or merge this pull request online at:
https://github.com/joncrlsn/dque/pull/40 Commit Summary
- cba597b https://github.com/joncrlsn/dque/pull/40/commits/cba597bfb21d922904040f590fe1eefecd6b128e Make sure the first segment is not empty or it's not complete (is current)
File Changes
(2 files https://github.com/joncrlsn/dque/pull/40/files)
- A queue https://github.com/joncrlsn/dque/pull/40/files#diff-00b109cf1123a591253cc534b17e5268eb8fc2fbb7d6772de7a55c135ef1282f (0)
- M queue.go https://github.com/joncrlsn/dque/pull/40/files#diff-979cedf61ccaba8f637a393ae99a88eae86eeb9817cab20e334a25a825913695 (19)
Patch Links:
— Reply to this email directly, view it on GitHub https://github.com/joncrlsn/dque/pull/40, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA7KRH53OAYEGS3ZCC6OF3Z45T2ZAVCNFSM6AAAAABQOLS3WKVHI2DSMVQWIX3LMV43ASLTON2WKOZSGYYDOOBZHE2TSNY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- When the whole world is running towards a cliff, he who is running in the opposite direction appears to have lost his mind. https://www.azquotes.com/quote/850693
Hi, Jon. Thanks for the quick merge! I actually realised that those segments above need to be also deleted, otherwise they will stay on the filesystem forever. I will create another PR for that. As for the maintenance, I am open to do that as we are using dque in production code and I am comfortable with the code already.
In an edge case, on load, we found that it is possible to have the first segment being empty (size()==0) and also complete (reached q.config.ItemsPerSegment limit). In such queue, the Peek() and Deque() return error 'empty', but that is not correct as the queue has another segment with available objects.