-
Notifications
You must be signed in to change notification settings - Fork 693
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
only increment participant version after updates #1646
Conversation
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.
@paulwe LGTM! But, have this feeling that I am missing something. Can you please wait for 👀 from @davidzhao just to be sure?
pkg/rtc/uptrackmanager_test.go
Outdated
@@ -257,7 +257,7 @@ func TestSubscriptionPermission(t *testing.T) { | |||
}, | |||
}, | |||
} | |||
um.UpdateSubscriptionPermission(subscriptionPermission, nil, nil, nil) | |||
um.UpdateSubscriptionPermission(subscriptionPermission, utils.TimedVersion{}, nil, nil) |
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.
guess I was lazy to add tests for skipping older version when I initially added the subscription permission version 😞 . Mind adding some tests for the timed version check paths.
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.
we defer to syncstore for version checking. emitted values are ordered and all of the updates are processed in a single goroutine so we don't need to check them in implementation code anymore.
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.
We should probably add tests or remove any version check completely from the code. 'SyncStore' is an implementation, but this code is released independent of 'SyncStore'. I think it is fine to say this module does not do any version check (looked like it still checks although I might have misread the diff) and it is an external responsibility to provide the right version. But if this module is doing version checks, would be good to add some tests. Not necessary to do now. Can be added later.
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.
lgtm!
should we start transitioning the simple version we are using to TimedVersion across the board in the proto itself?
I vote for moving to including timed version uniformly everywhere |
yes, as long as we have good int64 support everywhere it would be great to have one consistent version format |
* only increment participant version after updates * fix test util * cleanup * test uptrackmanager permission update version check
No description provided.