Skip to content

HDDS-12873. Improve ContainerData statistics synchronization. #8305

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

szetszwo
Copy link
Contributor

What changes were proposed in this pull request?

 /** parameters for read/write statistics on the container. **/
  private final AtomicLong readBytes;
  private final AtomicLong writeBytes;
  private final AtomicLong readCount;
  private final AtomicLong writeCount;
  private final AtomicLong bytesUsed;
  private final AtomicLong blockCount;

In ContainerData, the fields shown above are for statistics. The synchronization in current code is incorrect when updating multiple fields.

It is better to create a class for them and then synchronize the new class.

What is the link to the Apache JIRA

HDDS-12873

How was this patch tested?

By updating existing tests

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.

2 participants