[buddypress-trac] [BuddyPress Trac] #8544: Messages sent at the same time can encounter a race condition where they share the same thread_id

buddypress-trac noreply at wordpress.org
Tue Aug 10 13:32:35 UTC 2021


#8544: Messages sent at the same time can encounter a race condition where they
share the same thread_id
--------------------------------+------------------------------
 Reporter:  petersmithrestless  |       Owner:  (none)
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Messages            |     Version:  1.0
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |
--------------------------------+------------------------------
Changes (by petersmithrestless):

 * keywords:  needs-patch => has-patch
 * milestone:  Awaiting Contributions => Awaiting Review


Comment:

 I've created a patch which will ensure that the thread_id is generated at
 the same time as the message is inserted, in a single transaction.
 This will ensure that two messages submitted at the same time cannot end
 up being assigned the same thread_id.
 The generated thread_id is then fetched based on the newly inserted
 message id.

-- 
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8544#comment:2>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list