-
Notifications
You must be signed in to change notification settings - Fork 25.1k
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
Prioritized Replica Recovery is reversed by date #13249
Comments
@s1monw could you take a look at this please? |
I don't understand what you are testing here. I can't see the priorities you are giving, I don't see if the replicas where allocated before and if not there will be no ordering as far as I can tell. I don't see if primaries got allocated first and I wonder what you expected to see sorry it's unclear. |
I'm not familiar with the screenshot source but it looks like the indexes are recovering oldest to newest rather than newest to oldest. But I'm likely reading that wrong. |
Replica recovery order with 2 nodes.
I only set
They did. Synced flushed replica shards (not shown) also got recovered before these replicas were recovered.
I expected to see what @nik9000 suggested: the newest to oldest recovery of the replicas. Basically, It seems like the replica's do not consider priority in their recovery order and the oldest indices are being recovered. |
if you don't let the gateway allocator fetch any replicas to recover it won't respect priorities and will leave the rest to the shard balancer. The balancer will do it's own sorting at this point. This has never been implemented |
Today we try to allocate primaries first and then replicas but don't take the index creation date and priority into account as we do in the GatewayAlloactor. Closes elastic#13249
Today we try to allocate primaries first and then replicas but don't take the index creation date and priority into account as we do in the GatewayAlloactor. Closes #13249
Prioritized allocation enables the recovery in the order of
index.priority
>index.creation_date
>index.name
(reversed). However, I've found that when allowing it to work based onindex.creation_date
(the default mechanism), it does it in the reverse of the expected order relative to replicas.It's easy enough to reproduce with enough daily indices by manually deleting the replicas from one node, throttling the heck out of recovery, and speeding up monitoring:
As I was watching it, I decided to take some screenshots:
This also appears to not be honoring the
index.priority
either, as I tried to use it as a workaround and it did not impact the recovery order at all, which makes me assume that this is not even coming into play during replica recovery.The text was updated successfully, but these errors were encountered: