MeiliES icon indicating copy to clipboard operation
MeiliES copied to clipboard

ReadFrom does not list all events from some particular point in time

Open maarek opened this issue 5 years ago • 1 comments
trafficstars

When subscribing to a stream with only from defined, meilies seems to only read the event at the from location and then all new events. It does not read all events starting from the from value.

$ meilies-cli publish 'my-little-stream' 'my-event-two' '0' 
$ meilies-cli publish 'my-little-stream' 'my-event-two' '1'
$ meilies-cli publish 'my-little-stream' 'my-event-two' '2'  
$ meilies-cli subscribe 'my-little-stream:0'
Subscribed { stream: StreamName("my-little-stream") }
Event { stream: StreamName("my-little-stream"), number: EventNumber(0), event_name: EventName("my-event-two"), event_data: EventData("0") }

From my understanding, events are keyed by event number and ReadRange::ReadFrom(from) uses tree.scan_prefix(_) which in the case of from being 0 only 1 event is keyed with 0. Is this this right? Is this the intended result?

maarek avatar Feb 25 '20 20:02 maarek

Hum, you are right, it seems like a bug, when specifying the range from value the client must see every events starting from the left bound and all the new events.

Unfortunately I don't think I will have time to look into this bug for now.

Thank you for your report anyway, if you have time to look into that it would be pretty cool :)

Kerollmops avatar Feb 26 '20 10:02 Kerollmops