GreanTech / AtomEventStore

A server-less .NET Event Store based on the Atom syndication format
MIT License
117 stars 14 forks source link

LifoEvents should look past last address #97

Closed ploeh closed 10 years ago

ploeh commented 10 years ago

As discussed in #48, when events are written, the update of the index document's last link may fail on certain occasions.

Currently, LifoEvents<T> reads the index document's last link, and iterates backwards from there. However, before doing that, it should read in the document identified by the last link, and examine if that document has a next link. If it does, it should follow that next link, and recursively keep doing that until it reaches the true head of the event stream. That's the true last page in the event stream, and it should then enumerate the events backwards from that document.

It may be appropriate to wait with the implementation of this until #96 is done.