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

Allow placement strategies to skip directory registration #5074

Merged
merged 1 commit into from
Oct 6, 2018

Conversation

ReubenBond
Copy link
Member

@ReubenBond ReubenBond commented Oct 5, 2018

Changes to support placement directors which do not use the grain directory. In short, adds an IsUsingGrainDirectory prop to PlacementStrategy and removes some existing special-casing around StatelessWorkerPlacement being the only placement strategy which can bypass the directory.

This is a supporting PR for Service Fabric Stateful Service hosting #5073

/// Returns a value indicating whether or not this placement strategy requires activations to be registered in
/// the grain directory.
/// </summary>
public virtual bool IsUsingGrainDirectory => true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this break backward compatibility with 2.0 and 2/1?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will because PlacementStrategy is sent from silo-to-silo when we merge the list of supported grains.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't serialized, though: it's not backed by a field.

If it was defined as follows, then that would break serialization:

public virtual bool IsUsingGrainDirectory { get; } = true;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's good. Will it work though for cluster in a (temporary) hybrid state with some silos and clients running a version (2.1) without this change and some a version (2.2) with it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe so - there's no serialization or behavioral change in this PR until we start adding new placement strategies.

@sergeybykov sergeybykov merged commit 92e9811 into dotnet:master Oct 6, 2018
@ReubenBond ReubenBond deleted the feature-skipgraindirectory branch October 6, 2018 03:03
@github-actions github-actions bot locked and limited conversation to collaborators Dec 2, 2023
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.

3 participants