-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix cluster sharding benchmark #7061
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,11 +33,11 @@ public ResolveResp(string entityId, Address addr) | |
public Address Addr { get; } | ||
} | ||
|
||
public ShardedEntityActor() | ||
public ShardedEntityActor(string entityId) | ||
{ | ||
Receive<ShardingEnvelope>(e => | ||
Receive<Resolve>(_ => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the cause for the bug.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BITTEN BY MY OWN BUG FIX There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you @Arkatufus |
||
{ | ||
Sender.Tell(new ResolveResp(e.EntityId, Cluster.Get(Context.System).SelfAddress)); | ||
Sender.Tell(new ResolveResp(entityId, Cluster.Get(Context.System).SelfAddress)); | ||
}); | ||
|
||
ReceiveAny(o => Sender.Tell(o)); | ||
|
@@ -248,10 +248,12 @@ public static Config CreateDDataConfig(bool rememberEntities = false) | |
|
||
public static IActorRef StartShardRegion(ActorSystem system, string entityName = "entities") | ||
{ | ||
var props = Props.Create(() => new ShardedEntityActor()); | ||
var sharding = ClusterSharding.Get(system); | ||
return sharding.Start(entityName, _ => props, ClusterShardingSettings.Create(system), | ||
new ShardMessageExtractor()); | ||
return sharding.Start( | ||
typeName: entityName, | ||
entityPropsFactory: id => Props.Create(() => new ShardedEntityActor(id)), | ||
settings: ClusterShardingSettings.Create(system), | ||
messageExtractor: new ShardMessageExtractor()); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both report and statistics can be null if a benchmark case failed to run.