-
Notifications
You must be signed in to change notification settings - Fork 25.2k
total_shards_per_node
can prevent cold phase searchable snapshots from mounting
#115479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Pinging @elastic/es-data-management (Team:Data Management) |
we are affected by this issue as well and discovered the following: when ILM is moving an index from the hot to the cold phase, it is preserving the current index setting And so, when it is necessary that the index setting If the |
This should be resolved by #112972, which allows configuring the |
Hi @dakrone I have just upgraded our cluster to v8.16.1 and changed the ILM policy according to your suggestion: "cold": {
"min_age": "25h",
"actions": {
"set_priority": {
"priority": 80
},
"searchable_snapshot": {
"snapshot_repository": "found-snapshots",
"force_merge_index": false,
"total_shards_per_node": 2
}
}
}, Unfortunately, that doesn't have any effect: An index that had a Also looking at the code changed in #112972, this feature still seems to be limited to the frozen phase: if (TimeseriesLifecycleType.FROZEN_PHASE.equals(this.getKey().phase()) && this.totalShardsPerNode == null) {
ignoredSettings.add(ShardsLimitAllocationDecider.INDEX_TOTAL_SHARDS_PER_NODE_SETTING.getKey());
} Therefore, can you please reopen this issue? |
Ahh yes, apologies, I missed the part that this was cold instead of frozen. I'll re-open. |
As a workaround for anyone else hitting this, you can use the Updating the test policy from the original post would look like this: // PUT _ilm/policy/test-policy
{
"policy": {
"phases": {
"hot": {
"actions": {
"rollover": {
// Rollover targets, 3 documents here is for testing only.
"max_docs": 3
// Recommended rollover docs
// "max_primary_shard_docs": "200m"
// Recommended rollover size
// "max_primary_shard_size": "30gb"
},
"set_priority": {
"priority": 100
}
}
},
"warm": {
// setting min_age to 0ms puts shards into warm immediately after
// rollover if there are no warm nodes in the cluster, these shards will
// fall back to staying on the hot nodes.
"min_age": "0ms",
"actions": {
"allocate": {
// May be set to -1 to disable limits
"total_shards_per_node": 3
}
}
},
"cold": {
// Move the shard to the cold phase 15 seconds after rollover
"min_age": "15s",
"actions": {
// This action will trigger the force merge and snapshot at the end
// of the warm phase, _after_ `total_shards_per_node` was changed
"searchable_snapshot": {
"snapshot_repository": "found-snapshots"
}
}
}
}
}
} |
I just retested this and it does appear that #112972 did add support for it to the |
Elasticsearch Version
8.15.3
Installed Plugins
No response
Java Version
bundled
OS Version
ESS
Problem Description
Related to:
total_shards_per_node
setting on searchable snapshots in frozen #97979The allocate action appears to take place after the searchable snapshot action. This means a setting like
total_shards_per_node
(e.g. set at index creation time) can cause an index to become stuck in the cold phase and unable to complete its searchable snapshot action if the number of cold nodes can't accommodatetotal_shards_per_node
.Steps to Reproduce
Set up a 4x node cluster: 3x hot nodes + 1x cold node.
We can unstick the index by clearing
total_shards_per_node
We can also add an
allocate
-->total_shards_per_node
in a warm phase as a workaround.Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: