Ilmari Karonen wrote:
On 08/30/2011 01:17 AM, Platonides wrote:
Your bot doesn't need to do a full query on
the mime fields. You could
just keep track of uploads and deletions, and update the counters
accordingly.
That's actually a pretty good idea... hmm.
I do see a few problems, though. For example, uploads and deletions are
not the only things that can change the MIME type of a file; changes to
the MIME type detection code in MediaWiki can also cause that, possibly
with some delay since it may take a long time for something to trigger a
metadata update. This is not just a theoretical scenario -- I've seen
it happen.
Some maintenance script being run?
Also, I'm not sure what happens if a file is
oversighted without going
through normal deletion first. And I've also observed several instances
where MediaWiki bugs or server errors have led to missing log entries.
I didn't consider that. It seems indeed a source of inconsistencies,
although probably negligible.
There is potential for a little skew, and a full query may still be
needed from time to time, but such "fast" schema seems a good thing to
implement.