index_read_only_allow_delete: TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block (legacy: FORBIDDEN/12/index read-only / allow delete (api))(磁盘使用超过 flood-stage 水位线,索引带有 read-only-allow-delete 块)
Elasticsearch含义
由于 index.blocks.read_only_allow_delete 为 true,索引处于只读状态;无法写入或更新新文档,只能删除索引。Elasticsearch 通常在磁盘超过 flood stage 水位线时自动设置该项;ES 8.x 对写请求返回 HTTP 429。
原因
由于磁盘使用超过 flood stage 阈值而自动设置了该块,或该设置被手动设为 true。如果在未释放磁盘空间的情况下移除该块,Elasticsearch 会重新设置它。
解决方法
释放足够的磁盘空间。在 7.4+ 中,自动设置的块会在磁盘使用降到 high 水位线以下时自行清除;对于手动设置的块,或希望不等待立即清除,移除该块:PUT /_all/_settings {"index.blocks.read_only_allow_delete": null}。针对单个索引:PUT /index-name/_settings {"index.blocks.read_only_allow_delete": null}。如果反复出现,增加磁盘容量、设置 ILM 策略,并用 _cat/allocation 监控哪个节点在被写满。
同一数据库的其他条目
- cluster_block_exceptionClusterBlockException[blocked by: [TOO_MANY_REQUESTS/12/disk usage exceeded flood-stage watermark, index has read-only-allow-delete block]] (before 7.x: FORBIDDEN/12/index read-only / allow delete (api))(磁盘使用超过 flood-stage 水位线,索引被设为 read-only-allow-delete)
- high_disk_watermark_exceededhigh disk watermark [90%] exceeded / flood stage disk watermark [95%] exceeded(超过磁盘 high 水位线 [90%] / flood stage 水位线 [95%])
- circuit_breaking_exceptionCircuitBreakingException[[parent] Data too large, data for [<...>] would be [...], which is larger than the limit of [...]](数据过大,超过熔断器限制)
- mapper_parsing_exceptionmapper_parsing_exception: failed to parse field [...] of type [...](无法解析类型为 [...] 的字段 [...])
- strict_dynamic_mapping_exceptionstrict_dynamic_mapping_exception: mapping set to strict, dynamic introduction of [...] within [...] is not allowed(mapping 设为 strict,不允许动态添加字段)