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
TT-6968 GroupLogin synchronization force #4605
Conversation
API tests result: success ✅ |
API tests result: success ✅ |
API tests result: success ✅ |
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.
Added some comments, requested some information. Also, lets manually test with older versions od MDCB to check compatibility
func NewSyncForcer(redisController *storage.RedisController) *SyncronizerForcer { | ||
sf := &SyncronizerForcer{} | ||
|
||
sf.store = &storage.RedisCluster{KeyPrefix: "synchronizer-group-", RedisController: redisController} | ||
sf.store.Connect() | ||
|
||
return sf | ||
} |
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.
Could you explain why do we need a separate object and functions to force a synchronization? is not enough only sending the param to MDCB?
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.
@sredxny the force
param is going to change depending if the key exists or not in the Redis.
The RPC Connect
function receives a function getGroupLoginFunc
so I thought having a separated structure with its own groupLoginCallback
it's the cleanest way to do it, without modifying the current behavior since this new callback func is only going to work when the synchronizer is enabled (slave_options.synchroniser_enabled
).
Does it makes sense?
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.
lgtm!
Kudos, SonarCloud Quality Gate passed! |
API tests result: success ✅ |
API tests result: success ✅ |
I manually tested it with MDCB v2.0.3 and everything was working as expected. |
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.
lgtm
/release to release-4 |
Working on it! Note that it can take a few minutes. |
[changelog] fixed: force synchronization for the edge group when `slave_options.synchroniser_enabled` is set to true. (cherry picked from commit 178511b)
@tbuchaillot Succesfully merged PR |
/release to release-4.3 |
Working on it! Note that it can take a few minutes. |
[changelog] fixed: force synchronization for the edge group when `slave_options.synchroniser_enabled` is set to true. (cherry picked from commit 178511b)
@tbuchaillot Succesfully merged PR |
[changelog]
fixed: force synchronization for the edge group when
slave_options.synchroniser_enabled
is set to true.Description
This PR adds a new
groupLogin
callback function for RPC connections whenslave_options.synchroniser_enabled=true
. This changes the groupLogin function, adding an extra param to force the group synchronization in MDCB.It also adds a sync group key in Redis for the group to avoid multiple synchronizations force.
This is complementary to the work done in https://github.com/TykTechnologies/tyk-sink/pull/307
Related Issue
https://tyktech.atlassian.net/browse/TT-6968
Motivation and Context
https://tyktech.atlassian.net/browse/TT-6968
How This Has Been Tested
Added unit tests
Screenshots (if appropriate)
Types of changes
Checklist