From 67584a52215c14aee30abc951d868153b3ff2572 Mon Sep 17 00:00:00 2001 From: tbuchaillot Date: Tue, 1 Aug 2023 18:16:40 +0200 Subject: [PATCH] updating comments --- .github/workflows/linter.yaml | 1 - pumps/sql_aggregate.go | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index f7b973aeb..ea1c4cecf 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -27,7 +27,6 @@ jobs: go: ${{ matrix.go }} redis: 5 mongo: 4.2 - test-options: "-count=1 -failfast -v" golangci: needs: gotest if: ${{ always() }} diff --git a/pumps/sql_aggregate.go b/pumps/sql_aggregate.go index c1553cbb4..2dc32b284 100644 --- a/pumps/sql_aggregate.go +++ b/pumps/sql_aggregate.go @@ -123,13 +123,14 @@ func (c *SQLAggregatePump) Init(conf interface{}) error { return err } + // we can run the index creation in background only for postgres since it supports CONCURRENTLY shouldRunOnBackground := false if c.dbType == "postgres" { shouldRunOnBackground = true c.backgroundIndexCreated = make(chan bool) } - // if index doesn't exist, create it on background since it's going to migrate all the existing data + // if index doesn't exist, create it if err := c.ensureIndex(analytics.AggregateSQLTable, shouldRunOnBackground); err != nil { c.log.Error(err) return err