23 lines
966 B
Diff
23 lines
966 B
Diff
# UNDF: UNDF-2026-000000302
|
|
--- a/storm-client/src/jvm/org/apache/storm/daemon/worker/WorkerState.java
|
|
+++ b/storm-client/src/jvm/org/apache/storm/daemon/worker/WorkerState.java
|
|
@@ -110,2 +110,3 @@
|
|
// local executors and localTaskIds running in this worker
|
|
final Set<List<Long>> localExecutors;
|
|
final ArrayList<Integer> localTaskIds;
|
|
+ final HashSet<Integer> localTaskIdSet; // O(1) membership shadow of localTaskIds
|
|
|
|
@@ -194,2 +194,3 @@
|
|
this.localTaskIds = new ArrayList<>();
|
|
+ this.localTaskIdSet = new HashSet<>();
|
|
this.taskToExecutorQueue = new HashMap<>();
|
|
|
|
@@ -202,1 +202,2 @@
|
|
this.localTaskIds.addAll(taskIds);
|
|
+ this.localTaskIdSet.addAll(taskIds);
|
|
|
|
@@ -428,3 +428,3 @@
|
|
- if (!localTaskIds.contains(task)) {
|
|
+ if (!localTaskIdSet.contains(task)) {
|
|
neededConnections.add(taskToNodePortEntry.getValue());
|
|
}
|