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

HDDS-11386. Multithreading bug in ContainerBalancerTask #40

Closed
wants to merge 5 commits into from

Conversation

sarvekshayr
Copy link
Owner

What changes were proposed in this pull request?

The method getCurrentIterationsStatistic accesses various data structures and objects. A reading thread that's executing this method could be reading while the balancing thread is writing to these data structures and objects. This is code is not thread safe and can cause unpredictable errors.

Replaced List with CopyOnWriteArrayList.

What is the link to the Apache JIRA

HDDS-11386

How was this patch tested?

Test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant