chore: Use concurrent set instead of set (#28298)

## Description
Replaced set with concurrent set

#### PR fixes following issue(s)
Fixes #28322
This commit is contained in:
Nayan 2023-10-26 11:08:00 +06:00 committed by GitHub
parent 7b125741c7
commit d199b49eee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,6 +34,7 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicReference;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@ -101,7 +102,7 @@ public class PageLoadExecutablesUtilCEImpl implements PageLoadExecutablesUtilCE
Set<String> onPageLoadExecutableSetRef = new HashSet<>();
Set<String> explicitUserSetOnLoadExecutablesRef = new HashSet<>();
Set<String> bindingsFromExecutablesRef = new HashSet<>();
Set<String> bindingsFromExecutablesRef = ConcurrentHashMap.newKeySet();
// Function `extractAndSetExecutableBindingsInGraphEdges` updates this map to keep a track of all the
// executables which
@ -857,7 +858,7 @@ public class PageLoadExecutablesUtilCEImpl implements PageLoadExecutablesUtilCE
// All executables found from possibleExecutableNames set would add their dependencies in the following set for
// further
// walk to find more executables recursively.
Set<String> newBindings = new HashSet<>();
Set<String> newBindings = ConcurrentHashMap.newKeySet();
// First fetch all the executables in the page whose name matches the words found in all the dynamic bindings
Mono<List<EntityDependencyNode>> findAndAddExecutablesInBindingsMono = getPossibleEntityReferences(