You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by bh...@apache.org on 2020/02/24 21:18:28 UTC

[samza] branch 1.4.0 updated: SAMZA-2461 Fix: Concurrent Modification Exception in InMemorySystem (#1280)

This is an automated email from the ASF dual-hosted git repository.

bharathkk pushed a commit to branch 1.4.0
in repository https://gitbox.apache.org/repos/asf/samza.git


The following commit(s) were added to refs/heads/1.4.0 by this push:
     new 6d411a5  SAMZA-2461 Fix: Concurrent Modification Exception in InMemorySystem (#1280)
6d411a5 is described below

commit 6d411a54666e9132f4cf501445bf7dd17c2e81b4
Author: Yixing Zhang <to...@gmail.com>
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()));
   }
 }