LemmyNet / lemmy

🐀 A link aggregator and forum for the fediverse
https://join-lemmy.org
GNU Affero General Public License v3.0
13.28k stars 884 forks source link

INFO: paginationcursor possible to return duplicate posts? #4961

Closed MV-GH closed 3 months ago

MV-GH commented 3 months ago

Question

Jerboa used to check for duplicate postIds on post retrieval, since duplicates are often possible with page param. I believed that wasn't the case with paginationcursor. So this check wasn't implemented for it. But from what I hear from the user of Jerboa, it isn't case as they are experiencing duplicate posts. Is my understanding wrong about pagination cursor? Or is this more a bug on Lemmy side?

Pdzly commented 3 months ago

I didnt noticed any duplication on LW ( 0.19.3 ) on official Lemmy UI

Nothing4You commented 3 months ago

I believe this depends on the sort order? The cursor is effectively just a post id currently if I'm reading it correctly. When sorting by New the page cursor can easily determine where to continue without duplicates, but with other sort types, like Active, the sort order might change from what was used on the original request. If the post id used for the returned cursor is now earlier in the result, posts that used to be before this post will get returned again.

MV-GH commented 3 months ago

Ah yes that makes sense. I was thinking they all decay at the same rate but that's not the case