[wp-meta] [Making WordPress.org] #3351: Duplicated tickets in the theme final review queue

Making WordPress.org noreply at wordpress.org
Thu Dec 28 07:11:15 UTC 2017

#3351: Duplicated tickets in the theme final review queue
 Reporter:  chetan200891     |       Owner:
     Type:  defect           |      Status:  closed
 Priority:  normal           |   Milestone:
Component:  Theme Review     |  Resolution:  fixed
 Keywords:  has-screenshots  |
Changes (by dd32):

 * status:  new => closed
 * resolution:   => fixed


 Adding `DISTINCT` on this query isn't going to be an issue performance
 wise, however it wouldn't have actually worked in this case as the
 modified time would be unique.

 I've experimented with some `GROUP BY` options instead
  - Putting it in the subquery tends to slow it down by ~0.5-1s which isn't
 great, and is because the result set is rather large (It fetches every
 approval in the history of this Trac)
  - Putting it in the outer query seems to work okay, as long as it's
 grouping on `ticket.id` rather than `tc.ticket`

 The query on that report now looks like this:
    id AS ticket,
    reporter AS submitter,
    owner AS reviewer,
    tc.tc_time AS modified,
    t.keywords AS keywords

 FROM ticket t
       SELECT ticket, time as tc_time FROM ticket_change WHERE field =
 'status' AND newvalue = 'approved'
    ) tc
 ON (t.id = tc.ticket)
 WHERE status = 'approved'
 ORDER BY tc.tc_time

 I'm going to close this as fixed, if anyone spots it happen again or
 performance issues, just revert it to the version in [comment:3 Comment
 #3] and mark this as `wontfix` :)

Ticket URL: <https://meta.trac.wordpress.org/ticket/3351#comment:4>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org

More information about the wp-meta mailing list