What is the purpose of the bb_migrate_friends_count function?

31 Views Asked by At

My large and busy Production website, with a users database of close to 400,000 users, has been facing multiple-day delays for 'bb_forums_subscribed_discussion' Notifications, registered by the function bb_send_forums_subscribed_discussion() in buddyboss-platform\bp-forums\classes\class-bp-forums-notification.php

In the file buddyboss-platform\bp-core\bp-core-update.php the function bb_update_to_2_2_9() wrote in the database, in the wp_options table hundreds of thousands of rows that include the string "batch" in the option_name and the callback "bb_migrate_member_friends_count" saved by the function bb_create_background_member_friends_count()

It has been months since the 2.2.9 update and to this date, the database continues to be flooded with these batch processing, that is constantly executing as registered in the server logs. All the time, the logs write this in non-stop, over and over and this started months ago, and it still has never completed.

In a local dev, when we deleted all +100K batch records from wp_options that registered the callback bb_migrate_friends_count, notifications went out perfectly again, like we had hoped.

We are considering deleting all of these records from our live site, but we'd like to know exactly what this "bb_migrate_member_friends_count" actually does, and if eliminating it would drastically effect our site.

Does anyone have any experience with the "bb_migrate_member_friends_count"? Would anyone happen to know what exactly it is doing?

Thank you!

0

There are 0 best solutions below