Skip to content
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

Makes ImmovableAttribute configurable #9205

Merged
merged 4 commits into from
Nov 12, 2024

Conversation

ledjon-behluli
Copy link
Contributor

@ledjon-behluli ledjon-behluli commented Oct 27, 2024

Following some discussions in discord, its apparent that automatic migration by means of LAR or MAR can be mutually inclusive, even for short periods of time. It appears to be beneficial to allow a grain type to be migrated automatically by the runtime component (LAR, MAR, AA placement (future)) but not allow for others.

This PR adds a an enum ImmovableKind as an optional parameter to ImmovableAttribute

/// <summary>
/// Emphasizes that immovability is restricted to certain components.
/// </summary>
[Flags]
public enum ImmovableKind : byte
{
    /// <summary>
    /// Activations of this grain type will not be migrated by the repartitioner.
    /// </summary>
    Repartitioner = 1,
    /// <summary>
    /// Activations of this grain type will not be migrated by the rebalancer.
    /// </summary>
    Rebalancer = 2,
    /// <summary>
    /// Activations of this grain type will not be migrated by anything.
    /// </summary>
    Any = Repartitioner | Rebalancer
}
Microsoft Reviewers: Open in CodeFlow

@ledjon-behluli
Copy link
Contributor Author

Note: ActivationRebalancerWorker has [Immovable] applied to it, which translates to [Immovable(Kind = ImmovableKind.Any) as it must not be affected by the repartitioner, nor the rebalancer itself.

@ReubenBond ReubenBond merged commit 3535eb6 into dotnet:main Nov 12, 2024
16 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants