diff --git a/cmd/influxd/main.go b/cmd/influxd/main.go index 953452ce4b..e8b94df69d 100644 --- a/cmd/influxd/main.go +++ b/cmd/influxd/main.go @@ -213,7 +213,7 @@ func platformF(cmd *cobra.Command, args []string) { // be a long term solution. var ( natsHandler nats.Handler - storageQueryService query.QueryService + storageQueryService query.ProxyQueryService ) { sfile := tsdb.NewSeriesFile(filepath.Join(enginePath, tsdb.SeriesFileDirectory)) @@ -241,14 +241,16 @@ func platformF(cmd *cobra.Command, args []string) { natsHandler = engineHandler - storageQueryService = query.QueryServiceBridge{ - AsyncQueryService: &queryAdapter{ - Controller: NewController( - &store{shard: shard}, - &bucketLookup{bolt: c}, - &orgLookup{bolt: c}, - logger.With(zap.String("service", "storage")), - ), + storageQueryService = query.ProxyQueryServiceBridge{ + QueryService: query.QueryServiceBridge{ + AsyncQueryService: &queryAdapter{ + Controller: NewController( + &store{shard: shard}, + &bucketLookup{bolt: c}, + &orgLookup{bolt: c}, + logger.With(zap.String("service", "storage")), + ), + }, }, } } @@ -357,7 +359,7 @@ func platformF(cmd *cobra.Command, args []string) { MacroService: macroSvc, BasicAuthService: basicAuthSvc, OnboardingService: onboardingSvc, - QueryService: storageQueryService, + ProxyQueryService: storageQueryService, TaskService: taskSvc, ScraperTargetStoreService: scraperTargetSvc, ChronografService: chronografSvc, diff --git a/http/api_handler.go b/http/api_handler.go index dca7554c78..ddb92206f1 100644 --- a/http/api_handler.go +++ b/http/api_handler.go @@ -8,7 +8,6 @@ import ( "github.com/influxdata/platform" "github.com/influxdata/platform/chronograf/server" "github.com/influxdata/platform/query" - pzap "github.com/influxdata/platform/zap" "go.uber.org/zap" ) @@ -54,7 +53,7 @@ type APIBackend struct { MacroService platform.MacroService BasicAuthService platform.BasicAuthService OnboardingService platform.OnboardingService - QueryService query.QueryService + ProxyQueryService query.ProxyQueryService TaskService platform.TaskService ScraperTargetStoreService platform.ScraperTargetStoreService ChronografService *server.Service @@ -116,7 +115,7 @@ func NewAPIHandler(b *APIBackend) *APIHandler { h.QueryHandler.AuthorizationService = b.AuthorizationService h.QueryHandler.OrganizationService = b.OrganizationService h.QueryHandler.Logger = b.Logger.With(zap.String("handler", "query")) - h.QueryHandler.ProxyQueryService = pzap.NewProxyQueryService(h.QueryHandler.Logger) + h.QueryHandler.ProxyQueryService = b.ProxyQueryService h.ChronografHandler = NewChronografHandler(b.ChronografService)