我计划使用 MySQL Cluster o MySQL Galera Cluster 安装 Magento 2.0 以获得高可用性数据库。其中一个限制是每个表都应该有一个 PK。令我惊讶的是,并非 Magento 2.0 社区版上的每个表都有 PK。他们中的大多数人都有一个,但也有一些没有。
有没有人使用高度可用的集群数据库实现 Magento 安装?你是怎么做到的?我正在考虑将自动增量 PK 添加到没有 PK 的表中,但这可能意味着未来 Magento 升级与架构更改的问题。
你会怎么做?
编辑:这些是麻烦的表:
+--------------------------------------------------------------+--------+------+----------+--------+
| tbl | engine | nopk | ftidx | gisidx |
+--------------------------------------------------------------+--------+------+----------+--------+
| magento.cataloginventory_stock_status_tmp | MEMORY | | | |
| magento.catalogsearch_fulltext_scope1 | InnoDB | | FULLTEXT | |
| magento.catalog_category_product_index_tmp | MEMORY | NOPK | | |
| magento.catalog_product_entity_media_gallery_value_to_entity | InnoDB | NOPK | | |
| magento.catalog_product_entity_media_gallery_value_video | InnoDB | NOPK | | |
| magento.catalog_product_index_eav_decimal_tmp | MEMORY | | | |
| magento.catalog_product_index_eav_tmp | MEMORY | | | |
| magento.catalog_product_index_price_bundle_opt_tmp | MEMORY | | | |
| magento.catalog_product_index_price_bundle_sel_tmp | MEMORY | | | |
| magento.catalog_product_index_price_bundle_tmp | MEMORY | | | |
| magento.catalog_product_index_price_cfg_opt_agr_tmp | MEMORY | | | |
| magento.catalog_product_index_price_cfg_opt_tmp | MEMORY | | | |
| magento.catalog_product_index_price_downlod_tmp | MEMORY | | | |
| magento.catalog_product_index_price_final_tmp | MEMORY | | | |
| magento.catalog_product_index_price_opt_agr_tmp | MEMORY | | | |
| magento.catalog_product_index_price_opt_tmp | MEMORY | | | |
| magento.catalog_product_index_price_tmp | MEMORY | | | |
| magento.catalog_url_rewrite_product_category | InnoDB | NOPK | | |
| magento.cms_block | InnoDB | | FULLTEXT | |
| magento.cms_page | InnoDB | | FULLTEXT | |
| magento.customer_grid_flat | InnoDB | | FULLTEXT | |
| magento.oauth_nonce | InnoDB | NOPK | | |
| magento.sales_creditmemo_grid | InnoDB | | FULLTEXT | |
| magento.sales_invoice_grid | InnoDB | | FULLTEXT | |
| magento.sales_order_grid | InnoDB | | FULLTEXT | |
| magento.sales_shipment_grid | InnoDB | | FULLTEXT | |
| magento.widget_instance_page_layout | InnoDB | NOPK | | |
+--------------------------------------------------------------+--------+------+----------+--------+