# 记录一次clickhouse表新增字段遇到的问题

2020-10-23  本文已影响0人  ATNOW

问题描述

问题一:新增字段后发生复制副本上的元数据与Zookeeper中的通用元数据不一致的问题: Code: 517, e.displayText() = DB::Exception: Metadata on replica is not up to date with common metadata in Zookeeper. Cannot alter (version 20.6.4.44)

问题二:Cannot convert NULL value to non-Nullable type' if field type is Nullable <a name="mK2dc">

问题分析

当时主要做了以下操作:

(重新上线后发现该字段数据无法正常写入,始终为NULL,初步分析为数据类型不匹配,便有了以下操作)

_ (出现Cannot convert NULL value to non-Nullable type' if field type is Nullable)_

(发生read time out,删除失败)

(部分机子创建成功,再次删除method字段,发生__ Metadata on replica is not up to date with common metadata__)

解决方法

问题一:可以参考https://github.com/ClickHouse/ClickHouse/issues/13848 问题二:可以参考https://blog.csdn.net/sojer/article/details/104627542

上一篇 下一篇

猜你喜欢

热点阅读