From 1f9962c95b504f5bc1961941345c93ce1c8e6c9b Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 30 Oct 2018 17:12:38 +0000 Subject: [PATCH 1/2] Don't add multiple instances of a non-periodic table This is most likely to arise from legacy config, so just do a simple test to see if the table is repeated. Signed-off-by: Bryan Boreham --- table_manager.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/table_manager.go b/table_manager.go index 311619d7015f5..803a0831103f8 100644 --- a/table_manager.go +++ b/table_manager.go @@ -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, From 4bf217cd58315c405af93e83f8b50d3671db072b Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 30 Oct 2018 18:21:26 +0000 Subject: [PATCH 2/2] Add tags to original table Signed-off-by: Bryan Boreham --- schema_config.go | 1 + 1 file changed, 1 insertion(+) diff --git a/schema_config.go b/schema_config.go index b8983e5101cc2..7e8d498d89aa5 100644 --- a/schema_config.go +++ b/schema_config.go @@ -98,6 +98,7 @@ func (cfg *SchemaConfig) translate() error { Store: cfg.legacy.StorageClient, IndexTables: PeriodicTableConfig{ Prefix: cfg.legacy.OriginalTableName, + Tags: cfg.legacy.IndexTables.Tags, }, }) }