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

BalancedShardAllocator makes non-deterministic rebalance decisions #4867

Closed
s1monw opened this issue Jan 23, 2014 · 0 comments
Closed

BalancedShardAllocator makes non-deterministic rebalance decisions #4867

s1monw opened this issue Jan 23, 2014 · 0 comments
Assignees
Labels
>bug :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. v0.90.11 v1.0.0.RC2 v1.1.0 v2.0.0-beta1

Comments

@s1monw
Copy link
Contributor

s1monw commented Jan 23, 2014

NOTE: this is not a problem in production! It happens that the allocator iterates over the keys of a set which might be different across runs. This makes unittests non-reproducible. We should tie-break on the shard ID in that case.

@ghost ghost assigned s1monw Jan 23, 2014
s1monw added a commit that referenced this issue Jan 23, 2014
It happens to be the case that the iteration order of a HashMaps
keyset might be different across runs. This can cause undeterministic
results in shard balancing if weights are identical and multiple shards
of the same index are eligable for relocation. This commit adds
a tie-breaker based on the shard ID to prioritise the lowest shard
ID. This also makes `AddIncrementallyTests#testAddNodesAndIndices`
reproducible.

Closes #4867
s1monw added a commit that referenced this issue Jan 23, 2014
It happens to be the case that the iteration order of a HashMaps
keyset might be different across runs. This can cause undeterministic
results in shard balancing if weights are identical and multiple shards
of the same index are eligable for relocation. This commit adds
a tie-breaker based on the shard ID to prioritise the lowest shard
ID. This also makes `AddIncrementallyTests#testAddNodesAndIndices`
reproducible.

Closes #4867
@s1monw s1monw closed this as completed in 592a411 Jan 23, 2014
s1monw added a commit that referenced this issue Jan 23, 2014
It happens to be the case that the iteration order of a HashMaps
keyset might be different across runs. This can cause undeterministic
results in shard balancing if weights are identical and multiple shards
of the same index are eligable for relocation. This commit adds
a tie-breaker based on the shard ID to prioritise the lowest shard
ID. This also makes `AddIncrementallyTests#testAddNodesAndIndices`
reproducible.

Closes #4867
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
It happens to be the case that the iteration order of a HashMaps
keyset might be different across runs. This can cause undeterministic
results in shard balancing if weights are identical and multiple shards
of the same index are eligable for relocation. This commit adds
a tie-breaker based on the shard ID to prioritise the lowest shard
ID. This also makes `AddIncrementallyTests#testAddNodesAndIndices`
reproducible.

Closes elastic#4867
mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
It happens to be the case that the iteration order of a HashMaps
keyset might be different across runs. This can cause undeterministic
results in shard balancing if weights are identical and multiple shards
of the same index are eligable for relocation. This commit adds
a tie-breaker based on the shard ID to prioritise the lowest shard
ID. This also makes `AddIncrementallyTests#testAddNodesAndIndices`
reproducible.

Closes elastic#4867
@lcawl lcawl added :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. and removed :Allocation labels Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Distributed/Distributed A catch all label for anything in the Distributed Area. If you aren't sure, use this one. v0.90.11 v1.0.0.RC2 v1.1.0 v2.0.0-beta1
Projects
None yet
Development

No branches or pull requests

3 participants