!con #15496 Remember entries in cluster sharding
- Move all entry related logic out of the ShardRegion and into a new dedicated child `Shard` actor. - Shard actor persists entry started and passivated messages. - Non passivated entries get restarted on termination. - Shard Coordinator restarts shards on other regions upon region failure or handoff - Ensures shard rebalance restarts shards. - Shard buffers messages after an EntryStarted is received until state persisted - Shard buffers messages (still) after a Passivate is received until state persisted - Shard will retry persisting state until success - Shard will restart entries automatically (after a backoff) if not passivated and remembering entries - Added Entry path change to the migration docs
This commit is contained in:
parent
4ce7766164
commit
af657880e2
7 changed files with 909 additions and 163 deletions
|
|
@ -63,7 +63,7 @@ public class ClusterShardingTest {
|
|||
//#counter-extractor
|
||||
|
||||
//#counter-start
|
||||
ActorRef startedCounterRegion = ClusterSharding.get(system).start("Counter", Props.create(Counter.class),
|
||||
ActorRef startedCounterRegion = ClusterSharding.get(system).start("Counter", Props.create(Counter.class), false,
|
||||
messageExtractor);
|
||||
//#counter-start
|
||||
|
||||
|
|
@ -111,12 +111,12 @@ public class ClusterShardingTest {
|
|||
}
|
||||
|
||||
int count = 0;
|
||||
|
||||
// getSelf().path().parent().name() is the type name (utf-8 URL-encoded)
|
||||
|
||||
// getSelf().path().parent().parent().name() is the type name (utf-8 URL-encoded)
|
||||
// getSelf().path().name() is the entry identifier (utf-8 URL-encoded)
|
||||
@Override
|
||||
public String persistenceId() {
|
||||
return getSelf().path().parent().name() + "-" + getSelf().path().name();
|
||||
return getSelf().path().parent().parent().name() + "-" + getSelf().path().name();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue