mirror of https://github.com/apache/druid.git
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.
This commit is contained in:
parent
034d006d24
commit
a92a20e037
|
@ -217,9 +217,13 @@ public abstract class SQLMetadataConnector implements MetadataStorageConnector
|
|||
tableName, getPayloadType(), getQuoteString()
|
||||
),
|
||||
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)",
|
||||
tableName,
|
||||
getQuoteString()
|
||||
),
|
||||
StringUtils.format(
|
||||
"CREATE INDEX idx_%1$s_datasource_sequence ON %1$s(dataSource, sequence_name)",
|
||||
tableName
|
||||
)
|
||||
)
|
||||
);
|
||||
|
@ -264,14 +268,11 @@ public abstract class SQLMetadataConnector implements MetadataStorageConnector
|
|||
+ ")",
|
||||
tableName, getPayloadType(), getQuoteString()
|
||||
),
|
||||
StringUtils.format("CREATE INDEX idx_%1$s_used ON %1$s(used)", tableName),
|
||||
StringUtils.format(
|
||||
"CREATE INDEX idx_%1$s_datasource_end ON %1$s(dataSource, %2$send%2$s)",
|
||||
"CREATE INDEX idx_%1$s_datasource_used_end ON %1$s(dataSource, used, %2$send%2$s)",
|
||||
tableName,
|
||||
getQuoteString()
|
||||
),
|
||||
StringUtils.format(
|
||||
"CREATE INDEX idx_%1$s_datasource_sequence ON %1$s(dataSource, sequence_name)",
|
||||
tableName
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue