yeah that’s what i figured, i guess the bug is in the tag editor somewhere. i’ll make a note, etc.

I see the same, please undo the DISTINCT stuff as a properly joined query and data model cannot result in duplicates.
All it does is hide issues like this, which appears to be a double insert.

Okay, but undoing (reverting) means that other issues would go unnoticed. You know, like this one:

Your comment makes literally no sense. Wouldn’t you want the software to operate at its best? Identifying issues and resolving them works toward that end.

that’s what he wants, revert the latest change by removing DISTINCT, because it masks the underlying issue somewhere.

the takeaway here is that tone is important.

e: also, i think we shouldn’t do any further changes on trunk without a clear way to produce the duplicate entries sans-DISTINCT for every view perspective - tags, categories, etc. either a database dump or whatever else.

Ahh… Got it… My apologies for misunderstanding; I hadn’t checked today’s commits.

It’s hard to find good help these days. :man_shrugging:

well, at least everyone has an opinion on how to do things.

people affected, try running this query:

SELECT ref_id, int_id FROM ttrss_user_entries u1 WHERE 
    (SELECT COUNT(*) FROM ttrss_user_entries u2 
          WHERE u2.ref_id = u1.ref_id) > 1;

if there are results, this means that you actually do have multiple user entries linking to a base entry, which is one possible explanation for category/feed duplicates.

alternatively, you can try adding a constraint:

ALTER TABLE ttrss_user_entries ADD CONSTRAINT 
    enforce_unique_posts UNIQUE (ref_id);

and here’s how to drop it afterwards:

ALTER TABLE ttrss_user_entries DROP CONSTRAINT enforce_unique_posts;

e: it is unlikely to be the reason though because an all-column DISTINCT, like we had previously, would show these duplicates because they would have a different primary key (int_id).

i’d really prefer a database dump tbh.

e: this should deal with duplicate tags https://git.tt-rss.org/fox/tt-rss/commit/85b788709a9f7a93645f7aab1675b99d57874d0b

The tags editor ui fix seems to have solved my dupes. thx.

i’ve added a per-user preference to skip DISTINCT checking for headlines (except for Labels category):

https://git.tt-rss.org/fox/tt-rss/commit/f3d4bae32eae802c717ff36fcaad1f7ee56d2a39

if you don’t mind an occasional duplicate, enable it and report any performance changes. if you actually get duplicates, i’d appreciate a reproducible test-case or a database dump.

on my low-power celeron home server, this reduces times spent in headlines query (shown in f G) by half.

e: i noticed a bunch of what i thought were duplicates but apparently those were just some idiot posting again and again:

image

(article id is different)

tried it, it is noticeable faster :slight_smile: