-
Notifications
You must be signed in to change notification settings - Fork 280
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
Protect config object from concurrent modification issues #3945
Merged
peternied
merged 2 commits into
opensearch-project:main
from
peternied:concurrent-safe-config
Jan 17, 2024
Merged
Protect config object from concurrent modification issues #3945
peternied
merged 2 commits into
opensearch-project:main
from
peternied:concurrent-safe-config
Jan 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
peternied
requested review from
cliu123,
cwperks,
DarshitChanpura,
davidlago,
RyanL1997,
stephen-crawford,
reta and
willyborankin
as code owners
January 12, 2024 20:33
We've had rare reports of modification exceptions from customers around the config objects. Using a lock object to protect the internal collection from modification on other threads and changing the behavoir of the getter to pass a copy of the collection instead of direct collection references. - Resolves opensearch-project#3404 Signed-off-by: Peter Nied <[email protected]>
peternied
force-pushed
the
concurrent-safe-config
branch
from
January 12, 2024 20:43
0c7fe39
to
efdf2a0
Compare
Signed-off-by: Peter Nied <[email protected]>
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #3945 +/- ##
==========================================
+ Coverage 65.41% 65.45% +0.03%
==========================================
Files 298 298
Lines 21219 21239 +20
Branches 3457 3460 +3
==========================================
+ Hits 13880 13901 +21
Misses 5617 5617
+ Partials 1722 1721 -1
|
DarshitChanpura
approved these changes
Jan 16, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. left a nit.
src/main/java/org/opensearch/security/securityconf/impl/SecurityDynamicConfiguration.java
Show resolved
Hide resolved
stephen-crawford
approved these changes
Jan 17, 2024
opensearch-trigger-bot bot
pushed a commit
that referenced
this pull request
Jan 17, 2024
Signed-off-by: Peter Nied <[email protected]> (cherry picked from commit 6047d66) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
peternied
pushed a commit
that referenced
this pull request
Jan 17, 2024
…ues (#3956) Backport 6047d66 from #3945. Signed-off-by: Peter Nied <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dlin2028
pushed a commit
to dlin2028/security
that referenced
this pull request
May 1, 2024
…-project#3945) Signed-off-by: Peter Nied <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Protect config object from concurrent modification issues
We've had rare reports of modification exceptions from customers around the config objects. Using a lock object to protect the internal collection from modification on other threads and changing the behavoir of the getter to pass a copy of the collection instead of direct collection references.
Issues Resolved
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.