[wp-trac] [WordPress Trac] #17210: Massive duplication of oEmbed postmeta

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 8 01:35:54 UTC 2011


#17210: Massive duplication of oEmbed postmeta
--------------------------+------------------------------
 Reporter:  archon810     |       Owner:  Viper007Bond
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Embeds        |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by xknown):

 Looking at the WP_Embed code, it seems possible to have duplicate meta
 keys due to concurrency.

  - On line http://core.trac.wordpress.org/browser/trunk/wp-
 includes/media.php#L1046, all the oembed meta_keys are deleted after
 saving the post.
  - Then, on line http://core.trac.wordpress.org/browser/trunk/wp-
 includes/media.php#L1049, the oembed cache is filled via an ajax call if
 one updates the post (or publishes it). However, at this point the post
 was already inserted in the DB and if it's publicly accessible (i.e. not
 private), it will show up in the front page. Thus, there may be duplicated
 keys if update_post_meta is executed concurrently.

 One thing to try would be to update the oembed cache before the post
 becomes available on the front page.

 Not sure if the that makes sense or if it probably means that I have to
 sleep :)

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17210#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list