-
-
Notifications
You must be signed in to change notification settings - Fork 536
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
[management] Refactor peers to use store methods #2893
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
…unt-refactoring # Conflicts: # management/server/sql_store.go
…nt-refactoring # Conflicts: # management/server/sql_store.go
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
# Conflicts: # management/server/group.go # management/server/group/group.go # management/server/setupkey.go # management/server/sql_store.go # management/server/status/error.go # management/server/store.go
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
…account-refactoring
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
e8a5d16
to
9950683
Compare
9950683
to
20fc8e8
Compare
21f57c0
to
4abf9ad
Compare
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
4abf9ad
to
82746d9
Compare
# Conflicts: # management/server/policy.go # management/server/posture_checks_test.go # management/server/sql_store.go # management/server/sql_store_test.go # management/server/status/error.go # management/server/store.go # management/server/testdata/extended-store.sql
# Conflicts: # management/server/sql_store_test.go # management/server/status/error.go # management/server/testdata/extended-store.sql
…unt-refactoring # Conflicts: # management/server/account.go # management/server/http/peers_handler.go # management/server/peer.go
# Conflicts: # management/server/sql_store_test.go
… user peers with empty userID Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
err = am.Store.ExecuteInTransaction(ctx, func(transaction Store) error { | ||
groups, err = transaction.GetAccountGroups(ctx, LockingStrengthShare, accountID) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
peers, err = transaction.GetAccountPeers(ctx, LockingStrengthShare, accountID) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
settings, err = transaction.GetAccountSettings(ctx, LockingStrengthShare, accountID) | ||
return err | ||
}) |
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.
Not sure how much effect this transaction will have but should not hurt either
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.
I was waiting for #2957 to measure the performance, but I am already planning to continue passing the account object instead of db calls, since all the methods calling this have access to the account object
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
# Conflicts: # management/server/peer.go
# Conflicts: # management/server/peer.go
Quality Gate failedFailed conditions See analysis details on SonarQube Cloud Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE |
Describe your changes
Remove calls to get and save whole account in peers operations.
Issue ticket number and link
Checklist