Skip to content

Commit

Permalink
fix: clickhouse temporary files deletion happening twice (#5182)
Browse files Browse the repository at this point in the history
  • Loading branch information
achettyiitr authored Oct 9, 2024
1 parent 261aa60 commit 9f52106
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions warehouse/integrations/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
"github.com/rudderlabs/rudder-go-kit/logger"
"github.com/rudderlabs/rudder-go-kit/stats"

"github.com/rudderlabs/rudder-server/rruntime"
"github.com/rudderlabs/rudder-server/utils/misc"
"github.com/rudderlabs/rudder-server/warehouse/client"
sqlmw "github.com/rudderlabs/rudder-server/warehouse/integrations/middleware/sqlquerywrapper"
Expand Down Expand Up @@ -679,9 +678,6 @@ func (ch *Clickhouse) loadTablesFromFilesNamesWithRetry(ctx context.Context, tab
var gzipReader *gzip.Reader
gzipReader, err = gzip.NewReader(gzipFile)
if err != nil {
rruntime.GoForWarehouse(func() {
misc.RemoveFilePaths(objectFileName)
})
_ = gzipFile.Close()
err = fmt.Errorf("%s Error reading file using gzip.NewReader for file:%s while loading to table with error:%v", ch.GetLogIdentifier(tableName), gzipFile.Name(), err.Error())
onError(err)
Expand Down

0 comments on commit 9f52106

Please sign in to comment.