Convert doDeleteArticleReal to startAtomic()/endAtomic()
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Oct 2015 18:48:23 +0000 (11:48 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Mon, 26 Oct 2015 19:08:53 +0000 (12:08 -0700)
commitc2a52446e269bf4ec6184b6961ae9c39e47d5ad6
tree46e69e349933c02761c81f61f832179eedc809cc
parent9bbb55d2038fff24d648916969bb21716a99d4cd
Convert doDeleteArticleReal to startAtomic()/endAtomic()

* They no longer commit the update, but just make sure
  it is part of a transaction. The BEGIN/COMMIT will
  happen at request start/end given DBO_TRX or in this
  method otherwise (like when in CLI mode). This avoids
  premature committing of other transactions.
* FileDeleteForm was the only caller using $commit=false
  for WikiPage::doDeleteArticleReal() and its proxies
  WikiPage::doDeleteArticle() and Article::doDeleteArticle().
  The ugly $commit flag is now removed.
* No caller was using $id for WikiPage::doDeleteArticleReal()
  and its proxies WikiPage::doDeleteArticle() and
  Article::doDeleteArticle(). It is now removed and we can
  be sure the lock() and CAS logic always hit in the method.
  The rollback() calls are not needed given the page row lock
  and having them there could break outer transactions.
* Updated FileDeleteForm to use startAtomic()/endAtomic() so
  the article and file delete are still wrapped in a
  transaction. Note that LocalFile::delete() does reference
  counting and trxLevel() checks so it will not try to begin()
  and break FileDeleteForm's transaction via startAtomic().
* Moved less important 'page-recent-delete' key update down
  for sanity in case it blows up.

Change-Id: Idb98510506c0edd02236c30badaec97d86e07696
RELEASE-NOTES-1.27
includes/FileDeleteForm.php
includes/filerepo/file/File.php
includes/page/Article.php
includes/page/WikiPage.php