Page MenuHomePhabricator

Feature request: record context for which a Thank was given, such as RevisionId
Closed, DuplicatePublic

Description

I think it would be super helpful for the Thank log to provide context of which a Thank is given for. For example, most of time a Thank is given when an editor sees a revision and think that revision is good. Such context is a great signal for identifying revisions that's being marked as good.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Example query: https://quarry.wmflabs.org/query/49456

SELECT * FROM `logging` 
LEFT JOIN `comment`
ON `comment`.comment_id=logging.log_comment_id
WHERE log_type="thanks"
LIMIT 10;

Here in the logging table, a thank records the in the field log_actor of the thank-giver, and the log_page and log_title as the thank-receiver. The problem is to how do we incorporate the new information, mostly a revision id. There are 2 design options:

Option 1. add the revision_id in the log_params

  • cons: error-prone, can't be indexed and used for faster query
  • pros: fully backward compatible, not requiring a schema change, no downtime needed, smaller database size

Option 2. create a separate log_revision_id field,

  • cons: requiring a schema change, potential read-only down time, bigger database size
  • pros: much clearer, can be indexed, faster for query and other action.

Option 3. use`comment_id` as the revision_id for thanks log.

  • cons and pros: similar to Option 1 except it can be indexed, but pretty hacky and can cause problem when joined with comment table.

I suggest go with the Option 2.