mirror of
https://github.com/pgsty/minio.git
synced 2026-07-15 16:30:29 +03:00
add more deadlines and pass around context under most situations (#19752)
This commit is contained in:
+11
-3
@@ -2,7 +2,9 @@ package cmd
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
"github.com/minio/minio/internal/grid"
|
||||
"github.com/minio/minio/internal/logger"
|
||||
)
|
||||
|
||||
@@ -43,15 +45,21 @@ func authZLogIf(ctx context.Context, err error, errKind ...interface{}) {
|
||||
}
|
||||
|
||||
func peersLogIf(ctx context.Context, err error, errKind ...interface{}) {
|
||||
logger.LogIf(ctx, "peers", err, errKind...)
|
||||
if !errors.Is(err, grid.ErrDisconnected) {
|
||||
logger.LogIf(ctx, "peers", err, errKind...)
|
||||
}
|
||||
}
|
||||
|
||||
func peersLogAlwaysIf(ctx context.Context, err error, errKind ...interface{}) {
|
||||
logger.LogAlwaysIf(ctx, "peers", err, errKind...)
|
||||
if !errors.Is(err, grid.ErrDisconnected) {
|
||||
logger.LogAlwaysIf(ctx, "peers", err, errKind...)
|
||||
}
|
||||
}
|
||||
|
||||
func peersLogOnceIf(ctx context.Context, err error, id string, errKind ...interface{}) {
|
||||
logger.LogOnceIf(ctx, "peers", err, id, errKind...)
|
||||
if !errors.Is(err, grid.ErrDisconnected) {
|
||||
logger.LogOnceIf(ctx, "peers", err, id, errKind...)
|
||||
}
|
||||
}
|
||||
|
||||
func bugLogIf(ctx context.Context, err error, errKind ...interface{}) {
|
||||
|
||||
Reference in New Issue
Block a user