

继续跟中华石杉老师学习ES,第57篇
课程地址: https://www.roncoo.com/view/55
2.X的版本 解决并发问题:戳这里

全局锁:最粗的一个粒度,锁这个索引。
ES版本 6.4.1
已经创建了filesystem索引
再创建全局锁
PUT /filesystem/lock/global/_create
{}报错:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [filesystem] as the final mapping would have more than 1 type: [file, lock]"
}
],
"type": "illegal_argument_exception",
"reason": "Rejecting mapping update to [filesystem] as the final mapping would have more than 1 type: [file, lock]"
},
"status": 400
}虽然没成功,但是缺点还是显而易见的: 直接锁整个index,这个时候对index中所有的doc的操作,都会被block住,导致整个系统的并发能力很低。

先记录下,在6.4.1版本未成功

先记录下,在6.4.1版本未成功