This repository has been archived by the owner on Jul 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[801432, 807465] Related Issue to these BZs
Uninventory triggered our "assert-style" debug logging indicating that we were working with HashSet for child resources when we expected to be using a safer Set impl (wrt preventing ConcurrentModoficationException). There were a few issues in play: - When loading persisted resources from disk convert childResources to CopyOnWriteArraySet if necessary. This repairs resources persisted with the wrong Set impl. - Eliminate some potential concurrent modification danger (or, at a minimum, - Fix a couple of other places where we weren't using CopyOnWriteArraySet - Fix Resource entity to ensure that when customChildResourcesCollection=true that the childResources Set is truly protected. It was here that we were losing the proper Set impl. some unnecessary work) by only calling deactivateResource() on the root resource. It recursively deactivates the subtree, so no need to then call it on every node in the subtree. - Fix our "assert-logging" conditional, which despite finding this issue was actually looking for the wrong set impl. It had not been updated when we moved to CopyOnWriteArraySet.
- Loading branch information
Showing
3 changed files
with
44 additions
and
20 deletions.
There are no files selected for viewing
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
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
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