Skip to content

Commit

Permalink
fix thread-safe zerolog usage, details rs/zerolog#242 and https://git…
Browse files Browse the repository at this point in the history
  • Loading branch information
Slach authored and mskwon committed Jun 14, 2023
1 parent c20eeb0 commit 0a8b726
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/clickhouse-backup/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package main
import (
"context"
"fmt"
"github.com/rs/zerolog/diode"
stdlog "log"
"os"
"time"
Expand All @@ -13,6 +12,7 @@ import (
"github.com/Altinity/clickhouse-backup/pkg/server"
"github.com/Altinity/clickhouse-backup/pkg/status"
"github.com/rs/zerolog"
"github.com/rs/zerolog/diode"
"github.com/rs/zerolog/log"
"github.com/rs/zerolog/pkgerrors"
"github.com/urfave/cli"
Expand Down
2 changes: 1 addition & 1 deletion pkg/backup/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ func (b *Backuper) Download(backupName string, tablePattern string, partitions [
idx := i
tableTitle := t
metadataGroup.Go(func() error {
tableLogger := logger.With().Str("table_metadata", fmt.Sprintf("%s.%s", tableTitle.Database, tableTitle.Table)).Logger()
defer downloadSemaphore.Release(1)
tableLogger := logger.With().Str("table_metadata", fmt.Sprintf("%s.%s", tableTitle.Database, tableTitle.Table)).Logger()
downloadedMetadata, size, err := b.downloadTableMetadata(metadataCtx, backupName, disks, tableLogger, tableTitle, schemaOnly, partitions)
if err != nil {
return err
Expand Down

0 comments on commit 0a8b726

Please sign in to comment.