Skip to content

Conversation

@szetszwo
Copy link
Contributor

What changes were proposed in this pull request?

@xichen01 pointed out in #6518 (comment) that OMKeyInfo#copyObject is just a shallow copy. It is not thread safe since OmKeyInfo#acls is just an ArrayList.

Similarly, WithMetadata#metadata is also not thread safe.

In this PR, we replace ArrayList and HashMap and with CopyOnWriteArrayList and ConcurrentHashMap, respectively.

What is the link to the Apache JIRA

HDDS-10753

How was this patch tested?

Existing tests.

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @szetszwo for the patch.

@adoroszlai adoroszlai merged commit 32b1692 into apache:master Apr 26, 2024
@szetszwo
Copy link
Contributor Author

@adoroszlai , thanks a lot for reviewing and merging this!

jojochuang pushed a commit to jojochuang/ozone that referenced this pull request May 29, 2024
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