Merged
Conversation
The indexes introduced in apache#6348 were on the wrong table. The tests did not catch them due to retries on the create table steps (the first try created the table but not the bogus indexes; the second try noticed that the table already existed and did nothing). This patch doesn't fix the issue with the tests, since the best way to do that would be to do the table and index creation in a transaction; but, this is not supported by all of our supported database engines.
Contributor
Author
|
Thanks @QiuMM for the catch! |
QiuMM
approved these changes
Sep 21, 2018
jihoonson
reviewed
Sep 21, 2018
| ), | ||
| StringUtils.format( | ||
| "CREATE INDEX idx_%1$s_datasource_used_end ON %1$s(dataSource, used, %2$send%2$s)", | ||
| "CREATE INDEX idx_%1$s_datasource_end ON %1$s(dataSource, %2$send%2$s)", |
Contributor
There was a problem hiding this comment.
I wonder it's better to make an index for dataSource, sequence_name, end because this combination is used when searching an existing segmentId in IndexerSQLMetadataStorageCoordinator.allocatePendingSegment().
Contributor
Author
There was a problem hiding this comment.
We generally expect a small number of pending segments per sequence name, so I didn't think adding end would help much.
gianm
added a commit
to implydata/druid-public
that referenced
this pull request
Nov 16, 2018
The indexes introduced in apache#6348 were on the wrong table. The tests did not catch them due to retries on the create table steps (the first try created the table but not the bogus indexes; the second try noticed that the table already existed and did nothing). This patch doesn't fix the issue with the tests, since the best way to do that would be to do the table and index creation in a transaction; but, this is not supported by all of our supported database engines.
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
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.
The indexes introduced in #6348 were on the wrong table. The tests
did not catch them due to retries on the create table steps (the
first try created the table but not the bogus indexes; the second
try noticed that the table already existed and did nothing). This
patch doesn't fix the issue with the tests, since the best way to
do that would be to do the table and index creation in a
transaction; but, this is not supported by all of our supported
database engines.