This issue was missed in review: createHandler() should not be
touching handlers, as it is already called from computeIfAbsent()
and hence would result in a CME with JDK11:
https://bugs.openjdk.java.net/browse/JDK-
8206399
JIRA: CONTROLLER-1884
Change-Id: I8d4940b8bec2cf727d97d68796f1c9cdaaaf89d3
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
import static akka.actor.ActorRef.noSender;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static akka.actor.ActorRef.noSender;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
-import static com.google.common.base.Verify.verify;
import akka.actor.ActorRef;
import akka.dispatch.Futures;
import akka.actor.ActorRef;
import akka.dispatch.Futures;
final ActorRef handler = context().actorOf(SegmentedJournalActor.props(persistenceId, directory, storage,
maxEntrySize, maxSegmentSize));
LOG.debug("Directory {} handled by {}", directory, handler);
final ActorRef handler = context().actorOf(SegmentedJournalActor.props(persistenceId, directory, storage,
maxEntrySize, maxSegmentSize));
LOG.debug("Directory {} handled by {}", directory, handler);
-
- final ActorRef prev = handlers.putIfAbsent(persistenceId, handler);
- verify(prev == null, "Duplicate handler for %s, already handled by %s", persistenceId, prev);