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
Heterogenous silos support #2443
Changes from all commits
bbc118d
f793f2f
568cf00
4bdc77a
3aab754
7773313
a259b31
adf6ea1
83057de
77e80d8
6c5133f
7cca65d
bde9f2f
d619e3e
8b054d9
25cd773
fc940b6
8dd7422
44e117b
2c5f893
5da8979
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 |
---|---|---|
|
@@ -119,6 +119,7 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont | |
|
||
|
||
public GrainTypeManager GrainTypeManager { get; private set; } | ||
|
||
public SiloAddress LocalSilo { get; private set; } | ||
internal ISiloStatusOracle SiloStatusOracle { get; set; } | ||
internal readonly ActivationCollector ActivationCollector; | ||
|
@@ -200,6 +201,15 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont | |
/// </summary> | ||
public Dispatcher Dispatcher { get; } | ||
|
||
public IList<SiloAddress> GetCompatibleSiloList(GrainId grain) | ||
{ | ||
var typeCode = grain.GetTypeCode(); | ||
var compatibleSilos = GrainTypeManager.GetSupportedSilos(typeCode).Intersect(AllActiveSilos).ToList(); | ||
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 method has to be cheap, since it's on the warm/hot path. Currently, it is too allocation-happy for comfort. 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. It is really more a warm path than a hot path (this code is executed for new placements only). I think that yes, we could optimize this method, with some caching mechanism. But it is not that trivial to implement (a bug here and we could miss forever a new silos that joined, or try to place activations on a silos dead for a long time, ect.). So yes, it can be optimize, but it will add complexity. I am not sure it is worth doing it, especially in this PR. I can add a comment in this method and open an issue to track this if you want? 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. I see, that makes sense. We can consider looking into it afterwards, then |
||
if (compatibleSilos.Count == 0) | ||
throw new OrleansException($"TypeCode ${typeCode} not supported in the cluster"); | ||
return compatibleSilos; | ||
} | ||
|
||
internal void SetStorageManager(IStorageProviderManager storageManager) | ||
{ | ||
storageProviderManager = storageManager; | ||
|
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.
No usages of this?