Moderation queue number incorrect & posts duplicating.
Summary
If you are a moderator of a closed group, when you've approved all of the posts, you will likely see one or two still remaining, that you are unable to approve, as they are not in the queue. You will also see that some posts that you have already approved, are duplicate in the feed, one approved entity, one unapproved, with nothing in the moderation queue.
Steps to reproduce
Requires that you are a group moderator of a closed group.
Platform information
Cross-platform web
What is the current bug behavior?
Queue will show posts awaiting approval that are not
What is the expected correct behavior?
Queue should show empty if there are no posts to approve, furthermore posts should not be getting duplicated.
Relevant logs and/or screenshots
Video at this link https://www.minds.com/newsfeed/999958056778829824
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
added scoped labels
added scoped label
added 1 deleted label
removed milestone
assigned to @benhayward.ben
added scoped label
removed 1 deleted label
added 1 deleted label
removed label
changed time estimate to 5h
added 1h 30m of time spent at 2019-09-25
changed weight to 2
changed milestone to %Misc. Q4 2019
added 1 deleted label and removed 1 deleted label
added scoped label
changed title from Moderation queue number incorrect & posts duplicating. to Moderation queue number incorrect & posts duplicating.
mentioned in issue front#239
added scoped label and automatically removed label
removed label
- Developer
https://gitlab.com/minds/engine/blob/master/Core/Groups/AdminQueue.php#L86
Is the function that is counting, simply using
SELECT COUNT(*) FROM entities_by_time WHERE key = ?;
This number will return even when there are no activities send along with the number.
changed milestone to %Misc. Q4 2019
changed weight to 2
moved from minds#688 (moved)
mentioned in merge request !381 (closed)
added 1h of time spent at 2019-10-21
added scoped label
- Developer
Still ongoing issues with this.
unassigned @benhayward.ben
added scoped label and automatically removed label
- Developer
Ben 20:00 With the moderation queue discrepancies, I dug down, and it seems two near identical calls
select * from entities_by_time where key = ? select count(*) from entities_by_time where key = ?
Are seeing different things. top one returns say, 3 entities, but the count returns 5
Edited by Ben Hayward - Developer
Ben 13:55 2x ideas to add to the query
distinct CONSISTENCY ALL As it's taking a stab in the dark with production data, have either of you encountered this issue before? https://stackoverflow.com/questions/33161736/cassandra-cqlsh-giving-wrong-counts