Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#202 Feeds fail to update properly when entries ordered "wrong"

closed-accepted
Lars Windolf
None
5
2012-03-03
2011-07-11
Robert Trace
No

During parse and itemset merge, liferea assumes that all feed items are sorted newest->oldest. This causes problems when the items in the feed don't match this assumption. If a feed updates and (number_of_items_in_feed > cache_size), then itemset_merge_items() will keep the first cache_size elements and discard the rest. If the itemset is ordered randomly or, worst case, in oldest->newest order, then the feed is never seemingly updated since it's the oldest cache_size items that are always processed, again and again.

Atom feeds, in particular, state (RFC 4287):
This specification assigns no significance to the order of atom:entry
elements within the feed.

And:
atom:entry elements MUST contain exactly one atom:updated element.

So, feed items are allowed to be in any order, but there will be an ordering that can be discovered via sorting on the updated or published elements.

Attached is a patch that adds new feed entries to the itemset sorted newest->oldest. This allows the merge code to behave much better.

Discussion

  • Robert Trace
    Robert Trace
    2011-07-11

    Always add items to atom itemsets sorted by their timestamps

     
  • Lars Windolf
    Lars Windolf
    2011-07-25

    • assigned_to: nobody --> llando
    • milestone: 897517 -->
    • labels: 960927 -->
     
  • Lars Windolf
    Lars Windolf
    2011-12-14

    Thanks for this detailed reasoning and the patch!

    Applied against git master. To be released with 1.8.1

     
  • Lars Windolf
    Lars Windolf
    2011-12-14

    • status: open --> open-accepted
     
  • Lars Windolf
    Lars Windolf
    2012-03-03

    • status: open-accepted --> closed-accepted
     
  • Lars Windolf
    Lars Windolf
    2012-03-03

    Released with 1.8.1