- if (localShards.size() == 0) {
- createLocalShards(schemaContext);
- } else {
- for (ShardInformation info : localShards.values()) {
+ for (ShardInformation info : localShards.values()) {
+ if(info.getActor() == null) {
+ info.setActor(getContext().actorOf(Shard.props(info.getShardId(),
+ info.getPeerAddresses(), datastoreContext, schemaContext),
+ info.getShardId().toString()));
+ } else {