当前位置: 首页 > news >正文

记一次clickhouse手动更改分片数异常

背景:clickhouse中之前是1分片1副本,随着数据量增多,想将分片数增多,于是驻场人员手动添加了分片数的节点信息

<clickhouse><!-- 集群配置 --><clickhouse_remote_servers><feihuang_ck_cluster><shard><internal_replication>true</internal_replication><replica><host>feihuang3</host><port>9000</port><user>default</user><password>xxxxxxxx</password></replica><replica><host>feihuang5</host><port>9000</port><user>default</user><password>xxxxxxxx</password></replica></shard><shard><internal_replication>true</internal_replication><replica><host>feihuang12</host><port>9000</port><user>default</user><password>xxxxxxxx</password></replica><replica><host>feihuang13</host><port>9000</port><user>default</user><password>xxxxxxxx</password></replica></shard></feihuang_ck_cluster></clickhouse_remote_servers><!-- 本节点服务器的副本名称 --><macros><cluster>feihuang_ck_cluster</cluster><shard>2</shard><replica>feihuang13</replica></macros><!-- ZK配置信息 --><zookeeper-servers><node index="1"><host>feihuang6</host><port>2181</port></node><node index="2"><host>feihuang7</host><port>2181</port></node><node index="3"><host>feihuang8</host><port>2181</port></node></zookeeper-servers><!-- 数据压缩算法 --><clickhouse_compression><case><min_part_size>10000000000</min_part_size><min_part_size_ratio>0.01</min_part_size_ratio><method>zstd</method></case></clickhouse_compression>
</clickhouse>
```xml
但是发现每次写入一条数据,结果表中却又两条一样的数据。解决思路:排查配置文件,查看所有节点中的
<macros><cluster>feihuang_ck_cluster</cluster><shard>2</shard><replica>feihuang13</replica></macros>中的 <shard>2</shard>是不是都为2,结果发现全部都是2,这样对ck来说,配置了两个分片的节点信息,但是这都属于一个分片,导致数据写入两份,最后,将接地那shard分成两组,2个节点改为1,另外两个节点改为2,重启好了
http://www.lryc.cn/news/171424.html

相关文章:

  • 深度学习论文: ISTDU-Net:Infrared Small-Target Detection U-Net及其PyTorch实现
  • 图像识别-YOLO V8安装部署-window-CPU-Pycharm
  • js禁用F1至F12、禁止缩放、取消选中并且取消右键操作、打印、拖拽、鼠标点击弹出自定义信息、禁用开发者工具js
  • Zabbix5.0_介绍_组成架构_以及和prometheus的对比_大数据环境下的监控_网络_软件_设备监控_Zabbix工作笔记
  • 百度SEO优化TDK介绍(分析下降原因并总结百度优化SEO策略)
  • 搭建自动化 Web 页面性能检测系统 —— 设计篇
  • 记一次 mysql 数据库定时备份
  • 淘宝分布式文件存储系统(一) -TFS
  • LLM各层参数详细分析(以LLaMA为例)
  • linux ansible(三)
  • Anaconda和Pycharm详细安装 配置教程
  • 利用Linux虚拟化技术实现资源隔离和管理
  • 12基于MATLAB的短时傅里叶变换( STFT),连续小波变换( CWT),程序已调通,可以直接运行。
  • k8s使用时无法ping通服务器From IP地址 icmp_seq=1 Destination Host Unreachable
  • 两种风格的纯CSS3加载动画
  • Spring Cloud Eureka:服务注册与发现
  • 安防监控视频云存储平台EasyNVR对接EasyNVS时,一直不上线该如何解决?
  • 【完美解决】GitHub连接超时问题 Recv failure: Connection was reset
  • cpolar内网穿透
  • go语言操作数据库
  • zabbix实现钉钉报警
  • 基于微信小程序的语言课学习系统设计与实现(源码+lw+部署文档+讲解等)
  • R 语言画图中英文字体解决方案
  • Golang反射相关知识总结
  • go语言初学(备忘)
  • 免费获取独立ChatGPT账户!!
  • 4.docker容器编排(docker compose 与 docker swarm)
  • Linux中配置sudo用户访问权限
  • ASfP: 增强AOSP平台开发的利器——Android Studio for Platform
  • 【Html】用CSS定义咖啡 - 咖啡配料展示