-
Notifications
You must be signed in to change notification settings - Fork 825
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
Implements GetCounter and UpdateCounter on the SDK Server #3322
Implements GetCounter and UpdateCounter on the SDK Server #3322
Conversation
Build Failed 😱 Build Id: 42f7ef43-2752-41fd-b50f-c88a99a53b5d To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
7bcc72d
to
afe8590
Compare
Build Succeeded 👏 Build Id: ed0533ab-072b-48d1-ae7c-9a221c392268 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
5fac84a
to
074353c
Compare
Build Succeeded 👏 Build Id: 521463c0-afcf-4c92-a1ca-200096e28e9f The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
87fdb29
to
c843318
Compare
Build Failed 😱 Build Id: 456b779f-4fc0-4967-85ac-1f789239d1ee To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 73ff5c59-740b-43b4-8272-c422c2e7c752 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
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.
Looks good! Dropped a bunch of comments mostly around how we can avoid some race conditions as part of the process of batching and keeping an in memory cache, and hopefully some help with some simplification.
Build Failed 😱 Build Id: 2a3ee945-f307-47b6-9248-1a5e4261c1ee To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 8788b57b-a7d9-4916-a1d2-841bbd5d5af3 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
a9169c9
to
4a45e93
Compare
Build Failed 😱 Build Id: 444f2a60-415e-46a9-82d0-adad0a318946 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: 1c32d065-5350-4064-aaa1-fb5490152739 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: fb5db2c6-7c11-4137-bfa5-62de6c6a741a To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
cd75892
to
db7b6c4
Compare
Build Failed 😱 Build Id: bd7aaa9f-1748-4263-bb39-8c417e2c4719 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Failed 😱 Build Id: ead5eefd-49eb-421d-bb14-86edc3c51181 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
e50af10
to
4178925
Compare
New changes are detected. LGTM label has been removed. |
Build Failed 😱 Build Id: 448b6b4a-b634-4989-ac4f-fc79216fff1f To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
sigh
|
If the GameServer has been successfully updated by the client in the updateCounter this updated version is stored in the SDK. If the s.gameServer() is called and the Generation of the gameServer is less than (older than) the version stored in the SDK, then the SDK version is returned.
The diff will be a single aggregated number that may be truncated if final Count of the Counter would be less than zero or greater than capacity. This means a request to increment or decrement a Counter may only be partially applied.
…ater than Capacity after decrementation Also adds tests.
This logic followed a previous version of the proto for UpdateCounter.
Largest change is to truncate any existing Count to the Capacity, so that Count is always less than or equal to Capacity on any change.
4178925
to
53163c8
Compare
Sorry - should have been clear - the sigh was because the flake is showing up. This PR is great 😄 |
Build Failed 😱 Build Id: 5c115fa5-b443-4ce8-938f-5076991bf05a To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Build Succeeded 👏 Build Id: a02ec040-866e-4706-a9be-fffc85696203 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version:
|
What type of PR is this?
/kind feature
What this PR does / Why we need it:
Implements GetCounter and UpdateCounter on the SDK Server for feature Counts and Lists.
Removes the LocalSDKServer code for UpdateCounter as this followed the previous version of the alpha.proto.
Which issue(s) this PR fixes:
Working on #2716
Special notes for your reviewer: