User "Catrope" posted a comment on MediaWiki.r103146.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/103146#c26033
Commit summary:

New performance fix, now it checks if there is a need to do delete before 
performing it,
it needs extra select but that is less expensive than delete (croned it's still 
faster)
this needs to be reviewed by someone who knows sql, it's possible that executing
empty delete (0 rows are matched by condition) doesn't take more time than than 
executing
empty select + it's even possible that it doesn't replicate db in that case
if that is true, fix me
+ some fixes :)

Comment:

This is usually a bad idea because it gives rise to race conditions: what if a 
row is added or changed between the SELECT and DELETE queries? Lazy DELETEs 
that may or may not delete zero rows tend to be a good idea, not a bad idea.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to