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

sdkserver: fix race condition in SDK.SetLabel and SDK.SetAnnotation (issue #455) #588

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

Yingxin-Jiang
Copy link
Contributor

Fix issue #455.

When synchronizing GameServer with requested operations, i.e. updateState, updateLabel, updateAnnotation, change the key format from {operation}/{data} to {operation}. The operation data is persisted in SDKServer to prevent old operation data from overwriting the new one.

@agones-bot
Copy link
Collaborator

Build Failed 😱

Build Id: 1c400861-b848-408c-a4ac-83cbc15548a2

To get permission to view the Cloud Build view, join the agones-discuss Google Group.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 3f5630d9-5784-4aa2-9cdb-4daddf8112cb

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:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/588/head:pr_588 && git checkout pr_588
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=0.8.0-96a26dc

@@ -107,6 +111,9 @@ func NewSDKServer(gameServerName, namespace string, kubeClient kubernetes.Interf
healthMutex: sync.RWMutex{},
healthFailureCount: 0,
streamMutex: sync.RWMutex{},
gsLabels: map[string]string{},
gsAnnotations: map[string]string{},
gsUpdateMutex: sync.RWMutex{},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: no need to initialize mutex like that (default value is fine). feel free to remove all of those.

@jkowalski jkowalski merged commit 05efc96 into googleforgames:master Feb 13, 2019
@markmandel markmandel added this to the 0.8.0 milestone Feb 13, 2019
@markmandel markmandel added the kind/bug These are bugs. label Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug These are bugs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants