Skip to content
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

Forbid allocate_empty_primary if Stale Copy Exists? #38763

Closed
original-brownbear opened this issue Feb 12, 2019 · 3 comments
Closed

Forbid allocate_empty_primary if Stale Copy Exists? #38763

original-brownbear opened this issue Feb 12, 2019 · 3 comments
Labels
:Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) team-discuss

Comments

@original-brownbear
Copy link
Member

Currently, it appears that if we have a stale copy of some unassigned shard on node_a, we can force allocate an empty primary on node_b and needless forgo the data that is still on node_a.

I think just like we added a check for the existence of stale data on a node for allocate_stale_primary we should add a check for the non-existence of any stale data before allowing allocate_empty_primary.
There isn't really a scenario in which it would be advantageous to allow forgoing a stale shard-copy by allocating an empty primary on a node when one could at least allocate a stale primary on another node is there?

@original-brownbear original-brownbear added :Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) team-discuss labels Feb 12, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-distributed

@DaveCTurner
Copy link
Contributor

What happens if the only remaining shard copy cannot be assigned because it is corrupt? I think in this case we might want to be able to ignore it and allocate an empty primary in its place.

Yet I have definitely seen people mistype allocate_stale_primary as allocate_empty_primary and this idea would have caught that.

@original-brownbear
Copy link
Member Author

What happens if the only remaining shard copy cannot be assigned because it is corrupt? I think in this case we might want to be able to ignore it and allocate an empty primary in its place.

You mean, simply make allocate_stale_primary create an empty primary for corrupted shard copy? I'd be +1 to that idea :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Distributed/Allocation All issues relating to the decision making around placing a shard (both master logic & on the nodes) team-discuss
Projects
None yet
Development

No branches or pull requests

3 participants