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

only increment participant version after updates #1646

Merged
merged 4 commits into from
Apr 23, 2023
Merged

Conversation

paulwe
Copy link
Contributor

@paulwe paulwe commented Apr 22, 2023

No description provided.

Copy link
Contributor

@boks1971 boks1971 left a 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?

@@ -257,7 +257,7 @@ func TestSubscriptionPermission(t *testing.T) {
},
},
}
um.UpdateSubscriptionPermission(subscriptionPermission, nil, nil, nil)
um.UpdateSubscriptionPermission(subscriptionPermission, utils.TimedVersion{}, nil, nil)
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Member

@davidzhao davidzhao left a 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?

@boks1971
Copy link
Contributor

I vote for moving to including timed version uniformly everywhere

@paulwe
Copy link
Contributor Author

paulwe commented Apr 23, 2023

yes, as long as we have good int64 support everywhere it would be great to have one consistent version format

@paulwe paulwe merged commit 745410b into master Apr 23, 2023
1 check passed
@paulwe paulwe deleted the participant-version branch April 23, 2023 00:48
hautvfami pushed a commit to Stark-Industries-Ltd/livekit that referenced this pull request Jul 21, 2023
* only increment participant version after updates

* fix test util

* cleanup

* test uptrackmanager permission update version check
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants