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

Various refactorings #353

Merged
merged 1 commit into from
Jul 29, 2022
Merged

Various refactorings #353

merged 1 commit into from
Jul 29, 2022

Conversation

dgkanatsios
Copy link
Collaborator

Drafting a PR so we can run e2e tests here.

@dgkanatsios dgkanatsios force-pushed the refactorings branch 15 times, most recently from 67452bf to 70710ea Compare July 29, 2022 14:11
@dgkanatsios dgkanatsios changed the title [WIP] various refactorings Various refactorings Jul 29, 2022
@dgkanatsios dgkanatsios marked this pull request as ready for review July 29, 2022 14:33
// We use map[string]interface{} instead a []string to facilitate constant time lookups for GameServer names.
// On every reconcile loop, we check if all the GameServers for this GameServerBuild are present in cache)
// The controller code will eventually delete the extra GameServers, but we can improve this process.
// The solution is to create a synchonized map to track which objects were just created
Copy link
Contributor

Choose a reason for hiding this comment

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

synchronized

// (synchronized since it might be accessed by multiple reconciliation goroutines - one for each GameServerBuild)
// In this map, the key is GameServerBuild.Name
// The value is a struct with map[string]interface{} and a mutex
// The map acts like a set which contains the GameServer.Name for all the GameServers under creation
Copy link
Contributor

Choose a reason for hiding this comment

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

space after period

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's a property :D let me make it more clear!

@dgkanatsios dgkanatsios merged commit cb7aee8 into main Jul 29, 2022
@dgkanatsios dgkanatsios deleted the refactorings branch July 29, 2022 14:39
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

2 participants