Skip to content

Fix for RoundRobinStorageLocationSelectorStrategy not to pick the same storage location over and again#8634

Merged
asdf2014 merged 2 commits intoapache:masterfrom
sashidhar:round_robin_fix
Oct 12, 2019
Merged

Fix for RoundRobinStorageLocationSelectorStrategy not to pick the same storage location over and again#8634
asdf2014 merged 2 commits intoapache:masterfrom
sashidhar:round_robin_fix

Conversation

@sashidhar
Copy link
Copy Markdown
Contributor

@sashidhar sashidhar commented Oct 5, 2019

Fixes #8614.

Description

Fixes the issue with the possibility of RoundRobinStorageLocationSelectorStrategy picking up same storage location over again.

Fixed the bug by not sharing the iteration state returned by RoundRobinStorageLocationSelectorStrategy.getLocations() as per #8614 (comment).


This PR has:

  • been self-reviewed.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths.

Key changed/added classes in this PR
  • RoundRobinStorageLocationSelectorStrategy
  • StorageLocationSelectorStrategyTest

@sashidhar sashidhar changed the title Fix for RoundRobinStorageLocationSelectorStrategy not to pick same same storage location over and again Fix for RoundRobinStorageLocationSelectorStrategy not to pick the same same storage location over and again Oct 5, 2019
@sashidhar
Copy link
Copy Markdown
Contributor Author

@jihoonson please review.

@sashidhar sashidhar changed the title Fix for RoundRobinStorageLocationSelectorStrategy not to pick the same same storage location over and again Fix for RoundRobinStorageLocationSelectorStrategy not to pick the same storage location over and again Oct 5, 2019
Copy link
Copy Markdown
Contributor

@jihoonson jihoonson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. @sashidhar thank you for the quick fix!

@asdf2014 asdf2014 merged commit 124efa8 into apache:master Oct 12, 2019
@jon-wei jon-wei added this to the 0.17.0 milestone Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The same storage location can be picked up over again with RoundRobinStorageLocationSelectorStrategy

6 participants