[pLog-svn] comment counting

Oscar Renalias oscar at renalias.net
Thu Apr 13 18:38:52 GMT 2006


The problem is that by purging comments, we're only running a DELETE
query and not using the API to delete the comments. This means that
fields like num_comments, num_nonspam_comments, num_trackbacks and
num_nonspam_trackbacks are not updated accordingly.

What we should actually do is update the values of these fields once
we've run the delete operation. This might however be a costly
operation, since we might need to update thousands or even hundreds of
thousands of articles depending on the amount of spam.

I believe we will face the same problem when we purge inactive users,
inactive blogs and so on...

Oscar

On 4/13/06, Jon Daley <plogworld at jon.limedaley.com> wrote:
>         I might end up fixing this, but not at the moment, so I don't want
> to forget about it, and possibly one of you knows how to fix it faster
> than I can anyway.
>
>         When spam comments are purged, the post->getTotalComments()
> counter is not changed.
>
>         As far as I know, this requires a database edit to fix it.  The
> number isn't ever checked again, is that correct?  I guess that is the
> trouble with adding the extra columns for speed increases - that we need
> to make sure it is always in sync with the duplicated/recalculatable data.
>
> **************************************
> Jon Daley
> http://jon.limedaley.com/
>
> The sooner you fall behind, the more time you'll have to catch up.
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>


More information about the pLog-svn mailing list