Commit graph

2 commits

Author SHA1 Message Date
daniel
fe8b5fa79c make rev_actor_timestamp index cover the rev_id field.
This adds the rev_id column to the end of the rev_actor_timestamp index
to make it unambiguous. With the id field added, the index matches the
pagination criterion for user contributions (filter by actor, sort by
timestamp, then disambiguate based on revision id). The index is not
marked UNIQUE since this would potentially degrade write performance.
Uniqueness is already guaranteed by the rev_id field being the primary
key.

Note that no provisions are made to change the definition of the
rev_actor_timestamp index for existing instances. This index was only
recently added in I18071a2fe45907a0cf1b0fefebd96a97a2dacb7b and has not
been part of any release. It has also not yet been created on the wikimedia
servers. For this reason, any existing instances are assumed to be for
testing only. Instances would also continue to function normally with
the previous index definition.

With this patch, the new index will be created correctly when updating
from 1.34 or earlier. It will however not be modified for installations
of some development version of 1.35.

Bug: T200259
Bug: T238966
Change-Id: I511bb21b1ca820d950818cc831f8e3fef43a1559
2020-06-03 09:14:42 +02:00
Brad Jorsch
c04732b987 Alter revision for actor, comment, and MCR
We're finally to the point of making the massive alter to the `revision`
table that we've been building up to for 2.5 years now.

Changes here are:
* Drop `rev_text_id`, `rev_content_model`, and `rev_content_format` that
  MCR obsoleted.
* Drop `ar_text_id`, `ar_content_model`, and `ar_content_format` that
  MCR obsoleted.
* Replace `rev_comment` with `rev_comment_id`.
* Replace `rev_user` and `rev_user_text` with `rev_actor`, plus
  associated index changes.

Future patches will make the code changes to migrate data from
`revision_actor_temp` and `revision_comment_temp` into the new
`revision` columns.

Bug: T251343
Bug: T184615
Bug: T215466
Change-Id: I18071a2fe45907a0cf1b0fefebd96a97a2dacb7b
2020-05-08 15:26:56 +00:00