-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Reduce API mutex locking #3618
Reduce API mutex locking #3618
Conversation
At the moment it locks for the whole period of getting APIs from Dash/RPC and parsing the output. In the context of Legacy Cloud it can be a few seconds. Mutex should be locked only when we swap the global variable. Potentially shoud fix https://tyktech.atlassian.net/browse/TD-123
/release to release-3 |
/release to release-3.2 |
/release to release-3.2.2 |
Working on it! Note that it can take a few minutes. |
1 similar comment
Working on it! Note that it can take a few minutes. |
/release to release-3-lts |
Working on it! Note that it can take a few minutes. |
At the moment, it locks for the whole period of getting APIs from Dash/RPC and parsing the output. In the context of Legacy Cloud it can be a few seconds. Mutex should be locked only when we swap the global variable. Potentially should fix https://tyktech.atlassian.net/browse/TD-123 ## How This Has Been Tested <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> ## Screenshots (if appropriate) ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If you're unsure about any of these, don't hesitate to ask; we're here to help! --> - [ ] Make sure you are requesting to **pull a topic/feature/bugfix branch** (right side). If pulling from your own fork, don't request your `master`! - [ ] Make sure you are making a pull request against the **`master` branch** (left side). Also, you should start *your branch* off *our latest `master`*. - [ ] My change requires a change to the documentation. - [ ] If you've changed APIs, describe what needs to be updated in the documentation. - [ ] If new config option added, ensure that it can be set via ENV variable - [ ] I have updated the documentation accordingly. - [ ] Modules and vendor dependencies have been updated; run `go mod tidy && go mod vendor` - [ ] When updating library version must provide reason/explanation for this update. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. - [ ] Check your code additions will not fail linting checks: - [ ] `go fmt -s` - [ ] `go vet` (cherry picked from commit 2475fb2)
Working on it! Note that it can take a few minutes. |
@buger Succesfully merged |
/release to release-3.0.7 |
Still working... |
@buger Seems like there is conflict and it require manual merge. |
Working on it! Note that it can take a few minutes. |
Still working... |
1 similar comment
Still working... |
@buger Seems like there is conflict and it require manual merge. |
Still working... |
@buger Seems like there is conflict and it require manual merge. |
1 similar comment
@buger Seems like there is conflict and it require manual merge. |
At the moment, it locks for the whole period of getting APIs from Dash/RPC and parsing the output. In the context of Legacy Cloud it can be a few seconds. Mutex should be locked only when we swap the global variable. Potentially should fix https://tyktech.atlassian.net/browse/TD-123 <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If you're unsure about any of these, don't hesitate to ask; we're here to help! --> - [ ] Make sure you are requesting to **pull a topic/feature/bugfix branch** (right side). If pulling from your own fork, don't request your `master`! - [ ] Make sure you are making a pull request against the **`master` branch** (left side). Also, you should start *your branch* off *our latest `master`*. - [ ] My change requires a change to the documentation. - [ ] If you've changed APIs, describe what needs to be updated in the documentation. - [ ] If new config option added, ensure that it can be set via ENV variable - [ ] I have updated the documentation accordingly. - [ ] Modules and vendor dependencies have been updated; run `go mod tidy && go mod vendor` - [ ] When updating library version must provide reason/explanation for this update. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. - [ ] Check your code additions will not fail linting checks: - [ ] `go fmt -s` - [ ] `go vet`
At the moment, it locks for the whole period of getting APIs from Dash/RPC and parsing the output. In the context of Legacy Cloud it can be a few seconds. Mutex should be locked only when we swap the global variable. Potentially should fix https://tyktech.atlassian.net/browse/TD-123 <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If you're unsure about any of these, don't hesitate to ask; we're here to help! --> - [ ] Make sure you are requesting to **pull a topic/feature/bugfix branch** (right side). If pulling from your own fork, don't request your `master`! - [ ] Make sure you are making a pull request against the **`master` branch** (left side). Also, you should start *your branch* off *our latest `master`*. - [ ] My change requires a change to the documentation. - [ ] If you've changed APIs, describe what needs to be updated in the documentation. - [ ] If new config option added, ensure that it can be set via ENV variable - [ ] I have updated the documentation accordingly. - [ ] Modules and vendor dependencies have been updated; run `go mod tidy && go mod vendor` - [ ] When updating library version must provide reason/explanation for this update. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. - [ ] Check your code additions will not fail linting checks: - [ ] `go fmt -s` - [ ] `go vet`
At the moment, it locks for the whole period of getting APIs from Dash/RPC and parsing the output. In the context of Legacy Cloud it can be a few seconds. Mutex should be locked only when we swap the global variable. Potentially should fix https://tyktech.atlassian.net/browse/TD-123 <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If you're unsure about any of these, don't hesitate to ask; we're here to help! --> - [ ] Make sure you are requesting to **pull a topic/feature/bugfix branch** (right side). If pulling from your own fork, don't request your `master`! - [ ] Make sure you are making a pull request against the **`master` branch** (left side). Also, you should start *your branch* off *our latest `master`*. - [ ] My change requires a change to the documentation. - [ ] If you've changed APIs, describe what needs to be updated in the documentation. - [ ] If new config option added, ensure that it can be set via ENV variable - [ ] I have updated the documentation accordingly. - [ ] Modules and vendor dependencies have been updated; run `go mod tidy && go mod vendor` - [ ] When updating library version must provide reason/explanation for this update. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. - [ ] Check your code additions will not fail linting checks: - [ ] `go fmt -s` - [ ] `go vet`
At the moment, it locks for the whole period of getting APIs from Dash/RPC and parsing the output. In the context of Legacy Cloud it can be a few seconds. Mutex should be locked only when we swap the global variable. Potentially should fix https://tyktech.atlassian.net/browse/TD-123 <!-- Please describe in detail how you tested your changes --> <!-- Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality) <!-- Go over all the following points, and put an `x` in all the boxes that apply --> <!-- If you're unsure about any of these, don't hesitate to ask; we're here to help! --> - [ ] Make sure you are requesting to **pull a topic/feature/bugfix branch** (right side). If pulling from your own fork, don't request your `master`! - [ ] Make sure you are making a pull request against the **`master` branch** (left side). Also, you should start *your branch* off *our latest `master`*. - [ ] My change requires a change to the documentation. - [ ] If you've changed APIs, describe what needs to be updated in the documentation. - [ ] If new config option added, ensure that it can be set via ENV variable - [ ] I have updated the documentation accordingly. - [ ] Modules and vendor dependencies have been updated; run `go mod tidy && go mod vendor` - [ ] When updating library version must provide reason/explanation for this update. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. - [ ] Check your code additions will not fail linting checks: - [ ] `go fmt -s` - [ ] `go vet`
At the moment, it locks for the whole period of getting APIs from Dash/RPC and parsing the output.
In the context of Legacy Cloud it can be a few seconds.
Mutex should be locked only when we swap the global variable.
Potentially should fix https://tyktech.atlassian.net/browse/TD-123
How This Has Been Tested
Screenshots (if appropriate)
Types of changes
Checklist
fork, don't request your
master
!master
branch (left side). Also, you should startyour branch off our latest
master
.go mod tidy && go mod vendor
go fmt -s
go vet