ES外表mapping not found for the ES Cluster

【详述】创建ES外表查询报错
【StarRocks版本】例如:2.3.4
【问题描述】:es版本信息
{
“name”: “xxxxxx”,
“cluster_name”: “hlht-log”,
“cluster_uuid”: “OxiTGKDPSSSwl-4UkU6dvw”,
“version”: {
“number”: “6.8.0”,
“build_flavor”: “default”,
“build_type”: “docker”,
“build_hash”: “65b6179”,
“build_date”: “2019-05-15T20:06:13.172855Z”,
“build_snapshot”: false,
“lucene_version”: “7.7.0”,
“minimum_wire_compatibility_version”: “5.6.0”,
“minimum_index_compatibility_version”: “5.0.0”
},
“tagline”: “You Know, for Search”
}
创建es外表语句
CREATE EXTERNAL TABLE hdop.es_matomo_visit_log

(

visitTimestamp date ,

BrowserEngine VARCHAR (65535),

BrowserEngineVersion VARCHAR (65535),

BrowserName VARCHAR (65535),

BrowserVersion VARCHAR (65535),

Ua VARCHAR (65535)

)

ENGINE=ELASTICSEARCH

PARTITION BY RANGE (visitTimestamp)

()

PROPERTIES

(

“hosts” = “http://xxxxxxx:9200”,

“user” = “elastic”,

“password” = “xxxxxx”,

“index” = “matomo_visit_log_ialias”,

“type” = “_doc”

);
返回错误:SQL 错误 [1064] [42000]: fetch es table [es_matomo_visit_log] metadata failure: index[matomo_visit_log_ialias] type[_doc] mapping not found for the ES Cluster

尝试摘掉 “type” = “_doc” 再测试下呢?

都试了 还是不行 我用7.10版本的es试了下是可以的

好嘞,咱们可以提供下 之前测试的starrocks版本还有es版本么?

这个我们也碰到了,我感觉和es发生过重启有关,我修复并提了pr, 辛苦安排人帮看下,
https://github.com/StarRocks/starrocks/pull/13995
我看代码ut没跑过是因为日志原因,但我提交的pr里不涉及这块,看看是不是咱们着ut的问题。

6.x的版本一旦机器重启或者断连,有个corner case感觉是没考虑到的。辛苦看下我的pr.

starrocks 版本是2.3.4 es版本是6.8.0

6.8.0版本你试下带上include_type_name=true请求会报错吗?如果会报错的话,看下我这个pr, 已经被合并了。https://github.com/StarRocks/starrocks/pull/13995