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

Rename InstanceName to SiloName. #1740

Merged
merged 1 commit into from
May 13, 2016

Conversation

gabikliot
Copy link
Contributor

@gabikliot gabikliot commented May 9, 2016

Addresses #1738.

One important issue to watch is backward compatibility: since InstanceName is persisted, what will happen if we suddenly rename it to SiloName? Our clients should work without experiencing any pain, for example without needing to fully stop the cluster and delete the whole table.

I addressed backward compatibility issue on Azure. I kept both columns in the table. New silo will write its SiloName into both columns, and when reading entries of other silos it will try to parse SiloName from either of the columns.
I believe this will allow a mixed cluster (with old and new version) to co-exist. However, I have not tested that. In general, in other systems, this is a rather complicated and delicate issue that has to be dealt with great caution and usually solved strategically (as opposite to my "one-off" solution here).

As for SQL and ZK and Consul - I have not addressed backward compatibility there.
SQL does not currently have InstanceName at all, so it should not be a problem.
Consul does not populate InstanceName at all, so it should not be a problem.
ZK is the only one that needs to be dealt with.

@gabikliot
Copy link
Contributor Author

gabikliot commented May 9, 2016

@shayhatsor should express his opinion about ZK backward compat.

@@ -46,7 +46,7 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s
{
SiloAddress = jo["SiloAddress"].ToObject<SiloAddress>(serializer),
HostName = jo["HostName"].ToObject<string>(),
InstanceName = jo["InstanceName"].ToObject<string>(),
SiloName = jo["SiloName"].ToObject<string>(),
Copy link
Member

@shayhatsor shayhatsor May 9, 2016

Choose a reason for hiding this comment

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

This will throw when SiloName doesn't exist. I'll need to improve serialization here to account for this in an elegant way. In the meantime, it can just be

SiloName = (jo["SiloName"]??jo["InstanceName"]).ToObject<string>(),

@shayhatsor
Copy link
Member

shayhatsor commented May 9, 2016

@gabikliot, about Consul membership. It doesn't populate the InstanceName but after the rename to SiloName it should add it to the serialized value. As in all non-Azure implementations.

@sergeybykov sergeybykov self-assigned this May 9, 2016
@gabikliot
Copy link
Contributor Author

Addressed both comments: ZK and Consul.

@sergeybykov
Copy link
Contributor

There were some strange, likely unrelated, failures when I ran functional tests twice. Rerunning again to be sure.

@sergeybykov
Copy link
Contributor

The test failures still seem unrelated. So I'll merge this.

@sergeybykov sergeybykov merged commit 82a1e9f into dotnet:master May 13, 2016
@gabikliot gabikliot deleted the InstanceName-Rename branch June 22, 2016 04:03
@github-actions github-actions bot locked and limited conversation to collaborators Dec 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants