Clearing cache on stack with read only indices

Hi,

I have system (ES 7.6.2) with many read only indices (index.blocks.read_only=true). All works fine but when I want to clear cache (curl -X POST "localhost:9200/_cache/clear") then I'm getting a lot of errors "index [ranking_202002] blocked by: [FORBIDDEN/5/index read-only (api)];". Any reason for that or this is bug in ES?

Kind regards -
Krzysztof Ksiezyk

You probably want to use index.blocks.write rather than index.blocks.read_only. The read-only block doesn't allow metadata changes, including clearing the cache, but it sounds like you only want to block writes.

1 Like

I know about index.blocks.write and differences with "read_only" but it's more convenient for me to use read_only as it protects also against incidental removing or messing with index aliases. Just didn't see any connection between index metadata and cluster cache so asked this question

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.