Merge "Use job queue for deletion of pages with many revisions"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 10 Oct 2018 04:55:53 +0000 (04:55 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 10 Oct 2018 04:55:53 +0000 (04:55 +0000)
1  2 
autoload.php
includes/DefaultSettings.php
languages/i18n/en.json
languages/i18n/qqq.json

diff --combined autoload.php
@@@ -384,6 -384,7 +384,7 @@@ $wgAutoloadLocalClasses = 
        'DeleteLogFormatter' => __DIR__ . '/includes/logging/DeleteLogFormatter.php',
        'DeleteOldRevisions' => __DIR__ . '/maintenance/deleteOldRevisions.php',
        'DeleteOrphanedRevisions' => __DIR__ . '/maintenance/deleteOrphanedRevisions.php',
+       'DeletePageJob' => __DIR__ . '/includes/jobqueue/jobs/DeletePageJob.php',
        'DeleteSelfExternals' => __DIR__ . '/maintenance/deleteSelfExternals.php',
        'DeletedContribsPager' => __DIR__ . '/includes/specials/pagers/DeletedContribsPager.php',
        'DeletedContributionsPage' => __DIR__ . '/includes/specials/SpecialDeletedContributions.php',
        'Message' => __DIR__ . '/includes/Message.php',
        'MessageBlobStore' => __DIR__ . '/includes/cache/MessageBlobStore.php',
        'MessageCache' => __DIR__ . '/includes/cache/MessageCache.php',
 +      'MessageCacheUpdate' => __DIR__ . '/includes/deferred/MessageCacheUpdate.php',
        'MessageContent' => __DIR__ . '/includes/content/MessageContent.php',
        'MessageLocalizer' => __DIR__ . '/languages/MessageLocalizer.php',
        'MessageSpecifier' => __DIR__ . '/includes/libs/MessageSpecifier.php',
@@@ -3117,7 -3117,7 +3117,7 @@@ $wgDisableTitleConversion = false
  $wgDefaultLanguageVariant = false;
  
  /**
 - * Whether to enable the pig latin variant of English (en-x-piglatin),
 + * Whether to enable the pig Latin variant of English (en-x-piglatin),
   * used to ease variant development work.
   */
  $wgUsePigLatinVariant = false;
@@@ -5534,6 -5534,12 +5534,12 @@@ $wgAvailableRights = []
   */
  $wgDeleteRevisionsLimit = 0;
  
+ /**
+  * Page deletions with > this number of revisions will use the job queue.
+  * Revisions will be archived in batches of (at most) this size, one batch per job.
+  */
+ $wgDeleteRevisionsBatchSize = 1000;
  /**
   * The maximum number of edits a user can have and
   * can still be hidden by users with the hideuser permission.
@@@ -7518,6 -7524,7 +7524,7 @@@ $wgServiceWiringFiles = 
   * or (since 1.30) a callback to use for creating the job object.
   */
  $wgJobClasses = [
+       'deletePage' => DeletePageJob::class,
        'refreshLinks' => RefreshLinksJob::class,
        'deleteLinks' => DeleteLinksJob::class,
        'htmlCacheUpdate' => HTMLCacheUpdateJob::class,
diff --combined languages/i18n/en.json
        "badarticleerror": "This action cannot be performed on this page.",
        "cannotdelete": "The page or file \"$1\" could not be deleted.\nIt may have already been deleted by someone else.",
        "cannotdelete-title": "Cannot delete page \"$1\"",
+       "delete-scheduled": "The page \"$1\" is scheduled for deletion.\nPlease be patient.",
        "delete-hook-aborted": "Deletion aborted by hook.\nIt gave no explanation.",
        "no-null-revision": "Could not create new null revision for page \"$1\"",
        "badtitle": "Bad title",
        "movepage-moved": "<strong>\"$1\" has been moved to \"$2\"</strong>",
        "movepage-moved-redirect": "A redirect has been created.",
        "movepage-moved-noredirect": "The creation of a redirect has been suppressed.",
+       "movepage-delete-first": "The target page has too many revisions to delete as part of a page move.  Please first delete the page manually, then try again.",
        "articleexists": "A page of that name already exists, or the name you have chosen is not valid.\nPlease choose another name.",
        "cantmove-titleprotected": "You cannot move a page to this location because the new title has been protected from creation.",
        "movetalk": "Move associated talk page",
        "pageinfo-category-files": "Number of files",
        "pageinfo-user-id": "User ID",
        "pageinfo-file-hash": "Hash value",
 +      "pageinfo-view-protect-log": "View the protection log for this page.",
        "markaspatrolleddiff": "Mark as patrolled",
        "markaspatrolledlink": "[$1]",
        "markaspatrolledtext": "Mark this page as patrolled",
diff --combined languages/i18n/qqq.json
        "badarticleerror": "Used as error message in moving page.\n\nSee also:\n* {{msg-mw|Articleexists}}\n* {{msg-mw|Bad-target-model}}",
        "cannotdelete": "Error message in deleting. Parameters:\n* $1 - page name or file name",
        "cannotdelete-title": "Title of error page when the user cannot delete a page. Parameters:\n* $1 - the page name",
+       "delete-scheduled": "Warning message shown when page deletion is deferred to the job queue, and therefore is not immediate.",
        "delete-hook-aborted": "Error message shown when an extension hook prevents a page deletion, but does not provide an error message.",
        "no-null-revision": "Error message shown when no null revision could be created to reflect a protection level change.\n\nAbout \"null revision\":\n* Create a new null-revision for insertion into a page's history. This will not re-save the text, but simply refer to the text from the previous version.\n* Such revisions can for instance identify page rename operations and other such meta-modifications.\n\nParameters:\n* $1 - page title",
        "badtitle": "The page title when a user requested a page with invalid page name. The content will be {{msg-mw|badtitletext}}.",
        "movepage-moved": "Message displayed after successfully moving a page from source to target name.\n\nParameters:\n* $1 - the source page as a link with display name\n* $2 - the target page as a link with display name\n* $3 - (optional) the source page name without a link\n* $4 - (optional) the target page name without a link\nSee also:\n* {{msg-mw|Movepage-moved-redirect}}\n* {{msg-mw|Movepage-moved-noredirect}}",
        "movepage-moved-redirect": "See also:\n* {{msg-mw|Movepage-moved}}\n* {{msg-mw|Movepage-moved-noredirect}}",
        "movepage-moved-noredirect": "The message is shown after pagemove if checkbox \"{{int:move-leave-redirect}}\" was unselected before moving.\n\nSee also:\n* {{msg-mw|Movepage-moved}}\n* {{msg-mw|Movepage-moved-redirect}}",
+       "movepage-delete-first": "Error message shown when trying to move a page and delete the existing page by that name, but the existing page has too many revisions.",
        "articleexists": "Used as error message when moving a page.\n\nSee also:\n* {{msg-mw|Badarticleerror}}\n* {{msg-mw|Bad-target-model}}",
        "cantmove-titleprotected": "Used as error message when moving a page.",
        "movetalk": "The text of the checkbox to watch the associated talk page to the page you are moving. This only appears when the talk page is not empty. Used in [[Special:MovePage]].\n\nSee also:\n* {{msg-mw|Move-page-legend|legend for the form}}\n* {{msg-mw|newtitle|label for new title}}\n* {{msg-mw|Movereason|label for textarea}}\n* {{msg-mw|Move-leave-redirect|label for checkbox}}\n* {{msg-mw|Fix-double-redirects|label for checkbox}}\n* {{msg-mw|Move-subpages|label for checkbox}}\n* {{msg-mw|Move-talk-subpages|label for checkbox}}\n* {{msg-mw|Move-watch|label for checkbox}}",
        "pageinfo-category-files": "See also:\n* {{msg-mw|Pageinfo-category-pages}}\n* {{msg-mw|Pageinfo-category-subcats}}",
        "pageinfo-user-id": "The numeric ID for a user\n{{Identical|User ID}}",
        "pageinfo-file-hash": "Base-16 SHA-1 value of the file",
 +      "pageinfo-view-protect-log": "Contain link to protection link for the current page.",
        "markaspatrolleddiff": "{{doc-actionlink}}\nSee also:\n* {{msg-mw|Markaspatrolledtext}}\n{{Identical|Mark as patrolled}}",
        "markaspatrolledlink": "{{notranslate}}\nParameters:\n* $1 - link which has text {{msg-mw|Markaspatrolledtext}}",
        "markaspatrolledtext": "{{doc-actionlink}}\nSee also:\n* {{msg-mw|Markaspatrolleddiff}}",