Skip to content

Commit

Permalink
fix data race
Browse files Browse the repository at this point in the history
Signed-off-by: yangxuan <[email protected]>
  • Loading branch information
XuanYang-cn committed May 11, 2024
1 parent 1c59781 commit ff5b893
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/datanode/io/binlog_io.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ func (b *BinlogIoImpl) Upload(ctx context.Context, kvs map[string][]byte) error
innerK, innerV := k, v
future := b.pool.Submit(func() (any, error) {
var err error
log.Debug("BinlogIO upload", zap.String("paths", k))
log.Debug("BinlogIO upload", zap.String("paths", innerK))
err = retry.Do(ctx, func() error {
err = b.Write(ctx, innerK, innerV)
if err != nil {
log.Warn("BinlogIO fail to upload", zap.String("paths", k), zap.Error(err))
log.Warn("BinlogIO fail to upload", zap.String("paths", innerK), zap.Error(err))
}
return err
})
Expand Down

0 comments on commit ff5b893

Please sign in to comment.