-
Notifications
You must be signed in to change notification settings - Fork 83
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-9468] New SQL Aggregate indexes #694
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* change name from APISchema to ApiSchema
Co-authored-by: Gromit <policy@gromit>
* Updating storage to v1.0.7 * go mod tidy
tbuchaillot
changed the title
]New SQL Aggregate indexes
[TT-9468] New SQL Aggregate indexes
Aug 1, 2023
sredxny
approved these changes
Aug 1, 2023
mativm02
requested changes
Aug 1, 2023
mativm02
approved these changes
Aug 2, 2023
mativm02
approved these changes
Aug 28, 2023
sredxny
approved these changes
Aug 28, 2023
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-1.8 |
Working on it! Note that it can take a few minutes. |
tykbot bot
pushed a commit
that referenced
this pull request
Aug 29, 2023
* fixing SQL Aggregate indexes * TT-9490 change name from APISchema to ApiSchema (#681) * change name from APISchema to ApiSchema * update regex to blur mongo credentials (#686) * updated prometheus to 1.16 (#688) * Auto generated from templates by gromit (#692) Co-authored-by: Gromit <policy@gromit> * [TT-9464] Updating storage to v1.0.7 (#689) * Updating storage to v1.0.7 * go mod tidy * fixing SQL Aggregate indexes * removing unused func * linting * adding waiting time for sqlite * using background only on postgres * adding comment * updating comments * restoring linter.yaml * adding index created on non existing table, not background scenario * adding dbType var from config * taking care of side scenario * controlling bg chan * adding omit_index_creation --------- Co-authored-by: Sredny M <sredny.buitrago@gmail.com> Co-authored-by: Alok G Singh <alephnull@hcoop.net> Co-authored-by: Gromit <policy@gromit> Co-authored-by: Matias <83959431+mativm02@users.noreply.github.com> (cherry picked from commit 657436f)
@tbuchaillot Succesfully merged PR |
buger
added a commit
that referenced
this pull request
Aug 29, 2023
[TT-9468] New SQL Aggregate indexes (#694) * fixing SQL Aggregate indexes * TT-9490 change name from APISchema to ApiSchema (#681) * change name from APISchema to ApiSchema * update regex to blur mongo credentials (#686) * updated prometheus to 1.16 (#688) * Auto generated from templates by gromit (#692) Co-authored-by: Gromit <policy@gromit> * [TT-9464] Updating storage to v1.0.7 (#689) * Updating storage to v1.0.7 * go mod tidy * fixing SQL Aggregate indexes * removing unused func * linting * adding waiting time for sqlite * using background only on postgres * adding comment * updating comments * restoring linter.yaml * adding index created on non existing table, not background scenario * adding dbType var from config * taking care of side scenario * controlling bg chan * adding omit_index_creation --------- Co-authored-by: Sredny M <sredny.buitrago@gmail.com> Co-authored-by: Alok G Singh <alephnull@hcoop.net> Co-authored-by: Gromit <policy@gromit> Co-authored-by: Matias <83959431+mativm02@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR drops the
dimension
index for sql_aggregate pumps and creates a new one calledidx_dimension
. This change is made so the index we are using has the same order as Tyk Dashboard queries.In order to avoid blocking production table, we execute the index creation in a goroutine when the database is
postgres
and use the special postgres instructionCONCURRENTLY
to avoid table locking. More info about this hereRelated Issue
https://tyktech.atlassian.net/browse/TT-9468
Motivation and Context
https://tyktech.atlassian.net/browse/TT-9468
How This Has Been Tested
Added unit tests for SQLite scenarios (we don't have Postgres running on CI)
Tested manually
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