Skip to content

Conversation

@Zak-Kent
Copy link
Contributor

No description provided.

@Zak-Kent Zak-Kent added work in progress (...and please don't merge) don't merge labels Jul 30, 2020
@Zak-Kent Zak-Kent requested a review from a team as a code owner July 30, 2020 22:45
@Zak-Kent Zak-Kent force-pushed the pdb-4832-report-parition-index-on-id branch from dab5e3a to 4ab5fc8 Compare July 31, 2020 00:11
@Zak-Kent Zak-Kent changed the title (PDB-4832) Check partitions have index added during migration (PDB-4832) Add report id index in partitions Jul 31, 2020
@puppetcla
Copy link

CLA signed by all contributors.

@Zak-Kent Zak-Kent force-pushed the pdb-4832-report-parition-index-on-id branch from bc126ff to 8783fda Compare July 31, 2020 17:54
@Zak-Kent Zak-Kent removed don't merge work in progress (...and please don't merge) labels Jul 31, 2020
@Zak-Kent Zak-Kent force-pushed the pdb-4832-report-parition-index-on-id branch 2 times, most recently from 8cfbbcf to 0b65e07 Compare July 31, 2020 19:36
rbrw and others added 6 commits July 31, 2020 13:06
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
@austb austb force-pushed the pdb-4832-report-parition-index-on-id branch from 0b65e07 to 0b47e3b Compare July 31, 2020 20:27
Copy link
Contributor

@austb austb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Zak-Kent and others added 2 commits July 31, 2020 14:53
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.
@Zak-Kent Zak-Kent force-pushed the pdb-4832-report-parition-index-on-id branch from 0b47e3b to 0b11700 Compare July 31, 2020 21:55
@austb austb merged commit fb015c1 into puppetlabs:master Jul 31, 2020
@puppetcla
Copy link

CLA signed by all contributors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants