Skip to:

Opened 15 years ago

Closed 14 years ago

#1052 closed defect (bug) (no action required)

Activity table DB engine

Reported by: petronic's profile petronic Owned by:
Milestone: 1.2 Priority: minor
Severity: Version:
Component: Keywords:


What do you think about changing DB engine of activity table (wp_bp_activity_user_activity_cached) from MyISAM to InnoDB?

I had few cases when I needed to clear data after some activity is deleted and found that this is almost impossible to do because activities can be deleted by various criteria and we don't always know deleted activities IDs. If activity table is InnoDB we could create triggers to clear data for us.

Also, I guess there are more writes then reads from activity tables (maybe equal amount), so that can be another plus for InnoDB engine.

Change History (2)

#1 @apeatling
15 years ago

  • Milestone set to 1.2

Will look into this for 1.2.

#2 @apeatling
14 years ago

  • Resolution set to invalid
  • Status changed from new to closed

There's a hook in the code now that will return the activity_ids when activity entries are deleted. You can hook into this instead.

From the code:

 * Deleting Activity
 * There are multiple ways to delete activity items, depending on
 * the information you have at the time.
 * If you're looking to hook into one action that provides the ID(s) of
 * the activity/activities deleted, then use:
 * add_action( 'bp_activity_deleted_activities', 'my_function' );
 * The action passes one parameter that is a single activity ID or an
 * array of activity IDs depending on the number deleted.
Note: See TracTickets for help on using tickets.