You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 21, 2024. It is now read-only.
I am recently studying the Ambrosia source code. I think I may find a bug in ElasticCircularBuffer implemented in Ambrosia/Ambrosia/CircularBuffers.cs, though it seems not causing any trouble for now.
The first foreach iterates from buffers.First to buffers.Last. But this is actually not the desired behavior. Because when enqueued, the ElasticCircularBuffer reuses buffers.First if buffers.First contains an empty CircularBuffer, making buffers.First not actually the head. I also didn't see buffers.First being updated anywhere.
I guess it didn't cause any trouble because in testcases, CircularBuffer is big enough to hold all pending messages, so that ElasticCircularBuffer always contains only one CircularBuffer.
The text was updated successfully, but these errors were encountered:
Hi @zllai - thanks for reporting the issue. I wonder, can you provide a simple repro (program) that uses ElasticCircularBuffer stand alone, and shows the issue. That will help us diagnose and fix the data structure. If you have a fix, a PR would be very welcome as well :).
Hi Ambrosia team,
I am recently studying the Ambrosia source code. I think I may find a bug in
ElasticCircularBuffer
implemented inAmbrosia/Ambrosia/CircularBuffers.cs
, though it seems not causing any trouble for now.The first
foreach
iterates frombuffers.First
tobuffers.Last
. But this is actually not the desired behavior. Because when enqueued, theElasticCircularBuffer
reusesbuffers.First
ifbuffers.First
contains an emptyCircularBuffer
, makingbuffers.First
not actually the head. I also didn't seebuffers.First
being updated anywhere.I guess it didn't cause any trouble because in testcases,
CircularBuffer
is big enough to hold all pending messages, so thatElasticCircularBuffer
always contains only oneCircularBuffer
.The text was updated successfully, but these errors were encountered: