Skip to content

Commit

Permalink
Merge pull request grafana#1100 from cortexproject/just-one-nonperiodic
Browse files Browse the repository at this point in the history
more table-manager fixes
  • Loading branch information
bboreham authored Nov 1, 2018
2 parents 1cc9cb9 + 4bf217c commit c6f8c3d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions schema_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ func (cfg *SchemaConfig) translate() error {
Store: cfg.legacy.StorageClient,
IndexTables: PeriodicTableConfig{
Prefix: cfg.legacy.OriginalTableName,
Tags: cfg.legacy.IndexTables.Tags,
},
})
}
Expand Down
4 changes: 4 additions & 0 deletions table_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ func (m *TableManager) calculateExpectedTables() []TableDesc {
continue
}
if config.IndexTables.Period == 0 { // non-periodic table
if len(result) > 0 && result[len(result)-1].Name == config.IndexTables.Prefix {
continue // already got a non-periodic table with this name
}

table := TableDesc{
Name: config.IndexTables.Prefix,
ProvisionedRead: config.IndexTables.InactiveReadThroughput,
Expand Down

0 comments on commit c6f8c3d

Please sign in to comment.