[buddypress-trac] [BuddyPress Trac] #8426: Update queries when new message notifications mark as read

buddypress-trac noreply at wordpress.org
Sat Jan 16 22:39:04 UTC 2021

#8426: Update queries when new message notifications mark as read
 Reporter:  oztaser       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  8.0.0
Component:  Messages      |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
Changes (by oztaser):

 * keywords:  has-patch reporter-feedback => has-patch


 Yes, you are right. It runs the queries only for logged-in users I know
 that but it looks like a one-page view triggers queries multiple times.
 You can take a look query logs screenshot I attached. Whole queries
 triggered after one-page view. I'm just a little bit confused about it
 right now, I need to debug it again :)

 You also mentioned another good point. I believe running just one update
 query could be better. I didn't want to run a custom update query because
 I've seen that only the `bp_notifications_mark_notifications_by_item_id`
 function is used when I was working on the patch.

 If we decide to run one query with the `WHERE IN` clause, we also could
 consider improving other notification updates for the message component.

Ticket URL: <https://buddypress.trac.wordpress.org/ticket/8426#comment:5>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac

More information about the buddypress-trac mailing list