Nacos集群模式更新配置生成重复配置文件问题?(根源:mysql:唯一键约束失效)

最近nacos配置问题:Nacos集群模式,更新配置生成重复配置文件?

1、发现问题排查nacos配置,

查看nacos源码:

 发现nacos更新配置是根据dataId、groupId、tenantId作为唯一索引更新配置的。

2、nacos数据源mysql的表结构:

CREATE TABLE `config_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id',
  `data_id` varchar(255) COLLATE utf8_bin NOT NULL COMMENT 'data_id',
  `group_id` varchar(255) COLLATE utf8_bin DEFAULT NULL,
  `content` longtext COLLATE utf8_bin NOT NULL COMMENT 'content',
  `md5` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT 'md5',
  `gmt_create` datetime NOT NULL DEFAULT &

猜你喜欢

转载自blog.csdn.net/WXF_Sir/article/details/129836207