When I look at http://filmaster.pl/kokpit/?f=articles I see articles with 0 comments. When I click on the articles I see sometimes many comments below them. Something is wrong with cache invalidation.
Description
When I look at http://filmaster.pl/kokpit/?f=articles I see articles with 0 comments. When I click on the articles I see sometimes many comments below them. Something is wrong with cache invalidation.
Activity.number_of_comments is not updated properly somewhere. Following statements show activities with bad number of comments:
select id, created_at from useractivity_useractivity where number_of_comments>0 and (id,number_of_comments) not in (select object_id, count(*) from threadedcomments_threadedcomment where content_type_id=39 group by object_id) order by id desc;
select id, created_at from useractivity_useractivity where number_of_comments=0 and id in (select object_id from threadedcomments_threadedcomment where content_type_id=39) order by id desc;
Mariusz Kryński added a comment - 18/Apr/12 01:05 PM Activity.number_of_comments is not updated properly somewhere. Following statements show activities with bad number of comments:
select id, created_at from useractivity_useractivity where number_of_comments>0 and (id,number_of_comments) not in (select object_id, count(*) from threadedcomments_threadedcomment where content_type_id=39 group by object_id) order by id desc;
select id, created_at from useractivity_useractivity where number_of_comments=0 and id in (select object_id from threadedcomments_threadedcomment where content_type_id=39) order by id desc;
select id, created_at from useractivity_useractivity where number_of_comments>0 and (id,number_of_comments) not in (select object_id, count(*) from threadedcomments_threadedcomment where content_type_id=39 group by object_id) order by id desc;
select id, created_at from useractivity_useractivity where number_of_comments=0 and id in (select object_id from threadedcomments_threadedcomment where content_type_id=39) order by id desc;