Skip to:
Content

Opened 3 years ago

Closed 2 years ago

#2915 closed defect (duplicate)

bbp_forum_query_last_reply_id and bbp_update_forum_reply_count queries too long

Reported by: tharsheblows Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Component - Forums Keywords: dev-feedback has-patch
Cc:

Description

This is a number of characters issue. Those queries are getting killed because they have so many topic ids in them, one is currently 16833 characters long (over 2000 topics). I have fairly robust hosting so think this might be an issue for other people too?

I'm curious to know if anyone else is running into it - the number of topics and replies will be the same(ish) in eg the forums list and it won't be fixable in the tools. Or if there's another ticket open on it, I can't find one but that doesn't mean it's not there!


Attachments (2)

2915.diff (3.7 KB) - added by tharsheblows 3 years ago.
run through chunked topic_id arrays
2915.2.diff (3.7 KB) - added by tharsheblows 3 years ago.
adds in empty array to chunk array if that's empty

Download all attachments as: .zip

Change History (5)

@tharsheblows
3 years ago

run through chunked topic_id arrays

#1 @tharsheblows
3 years ago

I've just done the topic_ids in batches of 1000. I have a feeling this isn't the best way for everyone but it works for me and makes a decent starting point.

#2 @tharsheblows
3 years ago

  • Keywords has-patch added; needs-patch removed
  • Milestone changed from Awaiting Review to 2.6

Adds in empty array if $topic_ids starts off empty -- this allows it to run through WP_Query at least once which it needs. (+1 for good unit tests! I forgot to run them earlier. :) )

@tharsheblows
3 years ago

adds in empty array to chunk array if that's empty

#3 @johnjamesjacoby
2 years ago

  • Milestone 2.6 deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Inadvertently fixed this for 2.6 in a few different ways, namely using no_found_rows.

This shouldn't be an issue anymore, so closing.

If it's still a problem, let's reopen & pursue.

Note: See TracTickets for help on using tickets.