Skip to content

Commit

Permalink
SAMZA-2461 Fix: Concurrent Modification Exception in InMemorySystem (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhangyx39 authored and mynameborat committed Feb 24, 2020
1 parent 3ef1c67 commit 6d411a5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -199,6 +200,6 @@ private List<IncomingMessageEnvelope> poll(SystemStreamPartition ssp, String off
return new ArrayList<>();
}

return messageEnvelopesForSSP.subList(startingOffset, messageEnvelopesForSSP.size());
return ImmutableList.copyOf(messageEnvelopesForSSP.subList(startingOffset, messageEnvelopesForSSP.size()));
}
}

0 comments on commit 6d411a5

Please sign in to comment.