You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2023. It is now read-only.
At the moment we currently only have a single event for setting a oneof. This can cause issues if an entry in a oneof is removed.
For example:
message Foo {
oneof bar {
int32 a = 1;
int32 b = 2;
}
}
Assuming the following actions:
var foo = new Foo();
foo.A = 1;
foo.B = 2;
When you apply the events you would expect that A would no longer be set and B would have the value 2.
Now assume we make the following protocol change:
message Foo {
oneof bar {
int32 a = 1;
// remove b
}
}
If we apply those same events from before, we actually end up in a case where A is set to 1 still as the B set event is no longer valid and was just dropped in the ApplyEvent code.
We have a few options here. We can just document the edge case or we can look at generating two events for each oneof set. One that clears the old value and one that sets the new value.
The text was updated successfully, but these errors were encountered:
At the moment we currently only have a single event for setting a oneof. This can cause issues if an entry in a oneof is removed.
For example:
Assuming the following actions:
When you apply the events you would expect that A would no longer be set and B would have the value 2.
Now assume we make the following protocol change:
If we apply those same events from before, we actually end up in a case where A is set to 1 still as the B set event is no longer valid and was just dropped in the ApplyEvent code.
We have a few options here. We can just document the edge case or we can look at generating two events for each oneof set. One that clears the old value and one that sets the new value.
The text was updated successfully, but these errors were encountered: