Jump to content

[Managed DB] Tables without primary keys issue


Recommended Posts

Recently we are migrating our community to Digital Ocean where we are using their managed DB service. Soon after migration we started receiving these emails:

Quote

Our systems have indicated that your MySQL cluster, abc-db, has tables without primary keys. We have identified that MySQL tables without primary keys can lead to service replication issues that jeopardize performance and availability. If primary keys are not present for database tables exceeding 5,000 rows, data-loss can occur.

Currently we have only one DB node and we don't plan to extend that soon but it seems like it's a problem.

Any available fix for this? Maybe just adding the primary keys manually?

Thanks!

 

 

Link to comment
Share on other sites

@Marc Stridgen here is the list:

frm_core_acp_search_index
frm_core_acp_tab_order
frm_core_alerts_seen
frm_core_attachments_map
frm_core_automatic_moderation_pending
frm_core_cache
frm_core_follow_count_cache
frm_core_googleauth_used_codes
frm_core_item_markers
frm_core_item_member_map
frm_core_members_logins
frm_core_oauth_server_access_tokens
frm_core_oauth_server_authorization_codes
frm_core_post_before_registering
frm_core_reputation_leaderboard_history
frm_core_search_index_item_map
frm_core_search_index_tags
frm_core_security_answers
frm_core_sys_social_group_members
frm_core_tags_cache
frm_core_tags_perms
frm_core_tasks_log
frm_core_theme_settings_values
frm_core_view_updates
frm_forums_view_method
frm_ideas_votes

 

I know I am not supposed to change the DB manually but I need to figure out a working solution 🙂

 

What do you advice?

Link to comment
Share on other sites

  • 6 months later...

Here is their reasoning:

 

Quote

We currently have the variable sql_require_primary_key turned on to enable user create primary key on tables to avoid replication issue, node replication, etc. This has worked in the past and was not enforced but experience, time, and the information we have gathered from frequent issues ex. time it takes to create a new node for a service from a backup with large tables.

Primary keys are essential for certain management operations also for services that do not have standby or read replica service; any node replacements are performed by first bringing up a standby to which all data from old master is replicated and without primary keys this process may take exceedingly long or fail, Also failed nodes are replaced by restoring backup, which requires playing back binary logs and that may not work if large tables without primary keys have had recent changes.

Users with missing_mysql_primary_keys, will receive this message, sent every 72 hours for services with any primary key-less tables having over 5,000 rows.

 

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...