[wp-trac] [WordPress Trac] #44568: Two concurrent post deletes results in invalid return values
WordPress Trac
noreply at wordpress.org
Tue Aug 7 21:18:14 UTC 2018
#44568: Two concurrent post deletes results in invalid return values
--------------------------+------------------------------
Reporter: ajmccluskey | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version:
Severity: normal | Resolution:
Keywords: | Focuses: rest-api
--------------------------+------------------------------
Comment (by ajmccluskey):
Hey @soulseekah,
Thanks for the reply, and sorry for the lateness of mine. I didn't realise
WordPress wasn't thread-safe. Do you think the WordPress community would
be interested in me reporting any scarier concurrency bugs I might find
if/when I get back to testing WordPress? I would think it's worthwhile to
have a better understanding of the risks/costs of not being thread-safe.
If not I'll limit any future reports to those that don't involve
concurrency.
Cheers
Replying to [comment:1 soulseekah]:
> Hey there, welcome to Trac! Thanks for your ticket.
>
> WordPress operations are non-atomic. WordPress on the whole is not
thread-safe. This means that calling most of the APIs that interact with
the database is risky.
>
> If you need to protect your resources from concurrent operations you'll
have to perform synchornization (mutexing) yourself.
>
> Rewriting WordPress to be thread-safe means rewriting like 80% of its
APIs... a very daunting task. To my knowledge there haven't been any
attempts at even trying to include synchronization to API calls. Perhaps
it's time...
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44568#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list