Skip to content

Commit

Permalink
Fixed table-manager component
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoBraveCoding committed Nov 21, 2023
1 parent 3e578cb commit 41982d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions pkg/loki/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,7 @@ func (t *Loki) initTableManager() (services.Service, error) {
os.Exit(1)
}

reg := prometheus.WrapRegistererWith(prometheus.Labels{"component": "table-manager-store"}, prometheus.DefaultRegisterer)

tableClient, err := storage.NewTableClient(lastConfig.IndexType, *lastConfig, t.Cfg.StorageConfig, t.clientMetrics, reg, util_log.Logger)
tableClient, err := storage.NewTableClient("table-manager-store", lastConfig.IndexType, *lastConfig, t.Cfg.StorageConfig, t.clientMetrics, prometheus.DefaultRegisterer, util_log.Logger)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/storage/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ func NewChunkClient(component, name string, cfg Config, schemaCfg config.SchemaC
}

// NewTableClient makes a new table client based on the configuration.
func NewTableClient(name string, periodCfg config.PeriodConfig, cfg Config, cm ClientMetrics, registerer prometheus.Registerer, logger log.Logger) (index.TableClient, error) {
func NewTableClient(component, name string, periodCfg config.PeriodConfig, cfg Config, cm ClientMetrics, registerer prometheus.Registerer, logger log.Logger) (index.TableClient, error) {
switch true {
case util.StringsContain(testingStorageTypes, name):
switch name {
Expand All @@ -593,7 +593,7 @@ func NewTableClient(name string, periodCfg config.PeriodConfig, cfg Config, cm C
}

case util.StringsContain(supportedIndexTypes, name):
objectClient, err := NewObjectClient("table", periodCfg.ObjectType, cfg, cm, registerer)
objectClient, err := NewObjectClient(component, periodCfg.ObjectType, cfg, cm, registerer)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 41982d2

Please sign in to comment.