-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Conversation
8b053ba
to
d0c4085
Compare
@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>(), |
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.
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>(),
@gabikliot, about Consul membership. It doesn't populate the |
d0c4085
to
95ff2a2
Compare
Addressed both comments: ZK and Consul. |
There were some strange, likely unrelated, failures when I ran functional tests twice. Rerunning again to be sure. |
The test failures still seem unrelated. So I'll merge this. |
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.