[wp-trac] [WordPress Trac] #43044: Data inconsistencies

WordPress Trac noreply at wordpress.org
Tue Jan 9 03:15:31 UTC 2018


#43044: Data inconsistencies
--------------------------+-------------------------
 Reporter:  robertorodes  |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  Database      |     Version:  4.9.1
 Severity:  normal        |  Resolution:  maybelater
 Keywords:                |     Focuses:
--------------------------+-------------------------
Changes (by dd32):

 * status:  new => closed
 * resolution:   => maybelater
 * component:  General => Database
 * milestone:  Awaiting Review =>


Comment:

 Hey @robertorodes and welcome to Trac.

 You're correct in that WordPress does not currently use Transactions, and
 does not have any database-layer restrictions set up to enforce data
 consistency.

 WordPress, WordPress plugins, etc are encouraged to use the available
 API's and database funtions such as `$wpdb->insert()` and
 `$wpdb->update()` and checking their return values for whether a SQL
 command has succeeded or not.

 There's also no guarantee given that the data will not be changed by
 another process between ProcessA writing it and then reading it.
 If a plugin requires an absolute transaction to occur, they're free to
 initiate a transaction and save it at the end, it's just not "supported"
 in core.

 I'm closing this as `maybelater` as while I do agree with you, there's
 currently no active plans to change how the database layer operates at
 this point. Discussions can continue with the ticket closed, and if a
 committer feels dedicated to it, they can re-open it when the time comes
 to work on it.
 WordPress also currently supports a wide range of MySQL versions (and
 variants) and table types, not all of which support transactions AFAIK.
 There's also the database dropins available which use MSSQL or PostgreSQL
 & SQLite.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43044#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list