Feed Service doesn't correctly handle reading of feeds
Description
When trying to read the feed, Abdera is using a stax implementation that doesn't actually fully resolve when we ask for the entries, instead it gives us its own implementation of a list that streams the entries unless you do something that explicitly forces it to resolve them all. We didn't know this or expect it, so when we did input stream cleanup after asking for all the entries we were inadvertently closing the stream before all entries were read. The solution is simple enough we just need to do something to make the Abdera list fully resolve.
One thing we could try is to call .size() or convert the list to a Java type list.
Acceptance Criteria:
The Atom Feed Service works.
The service is able to handle a feed that is:
Initially empty and has an event published
Has events already and has a single event published
Has events already and has multiple events published
Has events already and has lots of events published (more than the page size)
Has events and becomes empty
Can deal with:
Has events
Repose queries the feed and sets the high water mark
New events get published and the old events get purged
Repose queries the feed again and sees the new event
Repose tries to get the next page – What happens???
The service should also handle:
The feed not being available for up to 2 days (although more likely just 2 hours).
When trying to read the feed, Abdera is using a stax implementation that doesn't actually fully resolve when we ask for the entries, instead it gives us its own implementation of a list that streams the entries unless you do something that explicitly forces it to resolve them all. We didn't know this or expect it, so when we did input stream cleanup after asking for all the entries we were inadvertently closing the stream before all entries were read. The solution is simple enough we just need to do something to make the Abdera list fully resolve.
One thing we could try is to call
.size()
or convert the list to a Java type list.Acceptance Criteria:
The Atom Feed Service works.
The service is able to handle a feed that is:
Initially empty and has an event published
Has events already and has a single event published
Has events already and has multiple events published
Has events already and has lots of events published (more than the page size)
Has events and becomes empty
Can deal with:
Has events
Repose queries the feed and sets the high water mark
New events get published and the old events get purged
Repose queries the feed again and sees the new event
Repose tries to get the next page – What happens???
The service should also handle:
The feed not being available for up to 2 days (although more likely just 2 hours).
Keystone v2v2 cache invalidation works.