File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
server/src/main/java/org/opensearch/search/profile/fetch Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 12
12
import org .opensearch .search .profile .Timer ;
13
13
14
14
import java .util .ArrayList ;
15
- import java .util .HashMap ;
16
15
import java .util .List ;
17
16
import java .util .Map ;
18
17
import java .util .Set ;
19
18
import java .util .TreeMap ;
19
+ import java .util .concurrent .ConcurrentHashMap ;
20
+ import java .util .concurrent .ConcurrentMap ;
20
21
21
22
/**
22
23
* Simplified profiling tree for fetch phase operations. Each fetch phase is
@@ -59,8 +60,8 @@ private static class Node {
59
60
}
60
61
61
62
private final List <Node > roots = new ArrayList <>();
62
- private final Map <String , Node > rootsMap = new HashMap <>();
63
- private final Map <String , Node > phaseMap = new HashMap <>();
63
+ private final ConcurrentMap <String , Node > rootsMap = new ConcurrentHashMap <>();
64
+ private final ConcurrentMap <String , Node > phaseMap = new ConcurrentHashMap <>();
64
65
65
66
/** Start profiling a new fetch phase and return its breakdown. */
66
67
FetchProfileBreakdown startFetchPhase (String element ) {
You can’t perform that action at this time.
0 commit comments