Remove multi-activation grains from Catalog
and ActivationDirectory
#7231
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes multiple activation concepts from the
Catalog
/'ActivationDirectory` as part of #6880.To do that, I needed some way to deal with the last remaining "multi-activation" thing in our system: stateless worker grains.
To allow
[StatelessWorker]
grains to be represented by a single activation in the Catalog/ActivationDirectory, I added a new class,StatelessWorkerGrainContext
, which implementsIGrainContext
for grains marked as[StatelessWorker]
.Since a stateless worker can have multiple activations with the same grain id,
StatelessWorkerGrainContext
manages a collection of regularActivationData
instances and delegates message handling to them.ActivationCollector
now relies onICollectibleGrainContext
, rather than referencingActivationData
directly.ActivationData
which are common to all activations of a particular grain type were moved intoGrainTypeSharedContext
. This reduces the weight of each activation and makes it easier to implementStatelessWorkerGrainContext
since it can delegate common functionality to that shared class.ActivationDirectory
around aGrainId
toIGrainContext
mapping, rather thanActivationId
toActivationData
(which had additional collections to mapGrainId
). All notion of multiple activations per GrainId was removed fromActivationDirectory
.Message.IsNewPlacement
was removed, since it's no longer necessary.The purpose is to:
IGrainContext
further in useful ways, so that other implementations can be added for different scenariosActivationId
(Remove ActivationId #6880)