-
Notifications
You must be signed in to change notification settings - Fork 227
(PDB-4832) Add report id index in partitions #3300
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
Merged
austb
merged 8 commits into
puppetlabs:master
from
Zak-Kent:pdb-4832-report-parition-index-on-id
Jul 31, 2020
Merged
(PDB-4832) Add report id index in partitions #3300
austb
merged 8 commits into
puppetlabs:master
from
Zak-Kent:pdb-4832-report-parition-index-on-id
Jul 31, 2020
Conversation
This file contains hidden or 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
Zak-Kent
commented
Jul 30, 2020
dab5e3a to
4ab5fc8
Compare
|
CLA signed by all contributors. |
bc126ff to
8783fda
Compare
8cfbbcf to
0b65e07
Compare
We lost this index when we partitioned the table and had to drop id as a primary key. We do want the index, performance-wise, so reestablish a normal index on id, per-partition.
This commit tests that partition indexes created by migration 74 don't break migration 76 when it is applied.
And bump it in the ext tests for upgrade and exit
0b65e07 to
0b47e3b
Compare
austb
approved these changes
Jul 31, 2020
Contributor
austb
left a comment
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.
👍
This commit tests the case where the old version of migration 74 has already been applied and the idx_report_id index wasn't added to the partitions. In this case migration 76 will add the index to any existing partitions. Changing the behavior of migration 74 after the fact should be safe because the index creation is guarded by 'if not exists' in both migration 74 and 76. If we've already migrated past 74 before the change then the index will get added in 76. If someone applies both 74 and 76 at the same time 76 will then become a no-op.
Add a schema diff check for migration 76 when the index has not been applied by migration 74 (which will be the case for anyone running a version of pdb between 6.10.0 and 6.11.2.
0b47e3b to
0b11700
Compare
|
CLA signed by all contributors. |
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.
No description provided.