This is an automated email from the ASF dual-hosted git repository.
bharathkk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/samza.git
The following commit(s) were added to refs/heads/master by this push:
new 999f5e9 SAMZA-2461 Fix: Concurrent Modification Exception in
InMemorySystem (#1280)
999f5e9 is described below
commit 999f5e9dfd25a334fbfa15eccd8366c51a3df76a
Author: Yixing Zhang <[email protected]>
AuthorDate: Mon Feb 24 13:00:34 2020 -0800
SAMZA-2461 Fix: Concurrent Modification Exception in InMemorySystem (#1280)
---
.../main/java/org/apache/samza/system/inmemory/InMemoryManager.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/samza-core/src/main/java/org/apache/samza/system/inmemory/InMemoryManager.java
b/samza-core/src/main/java/org/apache/samza/system/inmemory/InMemoryManager.java
index f53e0b3..f3028f9 100644
---
a/samza-core/src/main/java/org/apache/samza/system/inmemory/InMemoryManager.java
+++
b/samza-core/src/main/java/org/apache/samza/system/inmemory/InMemoryManager.java
@@ -20,6 +20,7 @@
package org.apache.samza.system.inmemory;
import com.google.common.base.Preconditions;
+import com.google.common.collect.ImmutableList;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collections;
@@ -199,6 +200,6 @@ class InMemoryManager {
return new ArrayList<>();
}
- return messageEnvelopesForSSP.subList(startingOffset,
messageEnvelopesForSSP.size());
+ return ImmutableList.copyOf(messageEnvelopesForSSP.subList(startingOffset,
messageEnvelopesForSSP.size()));
}
}