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.
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.