ILM shrink prevent write on the shrinked index

I noticed that the Shrink ILM operation makes the source & target index read only, which make sense because that's a requirement for a shrink even if done manually. The issue is that my shrinked index remains read only after the ILM as completed its work.

This is unexpected to me, the documentation (and the ILM page on Kibana) does not really mention that. It says "Sets a source index to read-only and shrinks it into a new index with fewer primary shards" but does not indicate that the shrinked index will remain read only. Besided, the shrink operation is only available when moving to the warm phase, which is supposed to still allow for updates (in my case vary rare, but can happen).

So it looks like a bug or missing feature but I would like to be sure before opening an issue.

Here is my policy:

{
  "policy": {
    "phases": {
      "hot": {
        "min_age": "0ms",
        "actions": {
          "set_priority": {
            "priority": 100
          }
        }
      },
      "warm": {
        "min_age": "60d",
        "actions": {
          "forcemerge": {
            "max_num_segments": 1,
            "index_codec": "best_compression"
          },
          "set_priority": {
            "priority": 50
          },
          "shrink": {
            "max_primary_shard_size": "50gb"
          },
          "allocate": {
            "number_of_replicas": 1
          }
        }
      },
      "cold": {
        "min_age": "740d",
        "actions": {
          "set_priority": {
            "priority": 10
          }
        }
      }
    }
  }
}

Can anyone confirm if this is an issue or not?

I currently do not have a workaround for this except not shrinking. But my hot indices have a lot of shards to support the write load and they don't need that much shards when they go warm. Keeping them will have an impact on the cluster performances at some point I think...
I don't mind the indices being read_only during the shrink operation, some writes will fail but as the indices are warm, there is not many writes and they can all be retried later.
But the indices staying read_only after the shrink and while they are warm is problematic.

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