Search and commands

↑ ↓ to select · Enter to open · Esc to close

Type to search packages.

logs

v9.24.1
github.com/redis/go-redis/v9/internal/maintnotifications/logs

Documentation

pkg.go.dev ↗

Table of contents

↓ to select · Enter to jump· Shift+Enter for source

145 matches

Top ↑

Constants

CircuitBreakerTransitioningToHalfOpenMessage (72 declarations)

const (
	// ========================================
	// CIRCUIT_BREAKER.GO - Circuit breaker management
	// ========================================
	CircuitBreakerTransitioningToHalfOpenMessage = "circuit breaker transitioning to half-open"
	CircuitBreakerOpenedMessage                  = "circuit breaker opened"
	CircuitBreakerReopenedMessage                = "circuit breaker reopened"
	CircuitBreakerClosedMessage                  = "circuit breaker closed"
	CircuitBreakerCleanupMessage                 = "circuit breaker cleanup"
	CircuitBreakerOpenMessage                    = "circuit breaker is open, failing fast"

	// ========================================
	// CONFIG.GO - Configuration and debug
	// ========================================
	DebugLoggingEnabledMessage = "debug logging enabled"
	ConfigDebugMessage         = "config debug"

	// ========================================
	// ERRORS.GO - Error message constants
	// ========================================
	InvalidRelaxedTimeoutErrorMessage                 = "relaxed timeout must be greater than 0"
	InvalidHandoffTimeoutErrorMessage                 = "handoff timeout must be greater than 0"
	InvalidHandoffWorkersErrorMessage                 = "MaxWorkers must be greater than or equal to 0"
	InvalidHandoffQueueSizeErrorMessage               = "handoff queue size must be greater than 0"
	InvalidPostHandoffRelaxedDurationErrorMessage     = "post-handoff relaxed duration must be greater than or equal to 0"
	InvalidEndpointTypeErrorMessage                   = "invalid endpoint type"
	InvalidMaintNotificationsErrorMessage             = "invalid maintenance notifications setting (must be 'disabled', 'enabled', or 'auto')"
	InvalidHandoffRetriesErrorMessage                 = "MaxHandoffRetries must be between 1 and 10"
	InvalidClientErrorMessage                         = "invalid client type"
	InvalidNotificationErrorMessage                   = "invalid notification format"
	MaxHandoffRetriesReachedErrorMessage              = "max handoff retries reached"
	HandoffQueueFullErrorMessage                      = "handoff queue is full, cannot queue new handoff requests - consider increasing HandoffQueueSize or MaxWorkers in configuration"
	InvalidCircuitBreakerFailureThresholdErrorMessage = "circuit breaker failure threshold must be >= 1"
	InvalidCircuitBreakerResetTimeoutErrorMessage     = "circuit breaker reset timeout must be >= 0"
	InvalidCircuitBreakerMaxRequestsErrorMessage      = "circuit breaker max requests must be >= 1"
	ConnectionMarkedForHandoffErrorMessage            = "connection marked for handoff"
	ConnectionInvalidHandoffStateErrorMessage         = "connection is in invalid state for handoff"
	ShutdownErrorMessage                              = "shutdown"
	CircuitBreakerOpenErrorMessage                    = "circuit breaker is open, failing fast"

	// ========================================
	// EXAMPLE_HOOKS.GO - Example metrics hooks
	// ========================================
	MetricsHookProcessingNotificationMessage = "metrics hook processing"
	MetricsHookRecordedErrorMessage          = "metrics hook recorded error"

	// ========================================
	// HANDOFF_WORKER.GO - Connection handoff processing
	// ========================================
	HandoffStartedMessage                            = "handoff started"
	HandoffFailedMessage                             = "handoff failed"
	ConnectionNotMarkedForHandoffMessage             = "is not marked for handoff and has no retries"
	ConnectionNotMarkedForHandoffErrorMessage        = "is not marked for handoff"
	HandoffRetryAttemptMessage                       = "Performing handoff"
	CannotQueueHandoffForRetryMessage                = "can't queue handoff for retry"
	HandoffQueueFullMessage                          = "handoff queue is full"
	FailedToDialNewEndpointMessage                   = "failed to dial new endpoint"
	ApplyingRelaxedTimeoutDueToPostHandoffMessage    = "applying relaxed timeout due to post-handoff"
	HandoffSuccessMessage                            = "handoff succeeded"
	RemovingConnectionFromPoolMessage                = "removing connection from pool"
	NoPoolProvidedMessageCannotRemoveMessage         = "no pool provided, cannot remove connection, closing it"
	WorkerExitingDueToShutdownMessage                = "worker exiting due to shutdown"
	WorkerExitingDueToShutdownWhileProcessingMessage = "worker exiting due to shutdown while processing request"
	WorkerPanicRecoveredMessage                      = "worker panic recovered"
	WorkerExitingDueToInactivityTimeoutMessage       = "worker exiting due to inactivity timeout"
	ReachedMaxHandoffRetriesMessage                  = "reached max handoff retries"

	// ========================================
	// MANAGER.GO - Moving operation tracking and handler registration
	// ========================================
	DuplicateMovingOperationMessage  = "duplicate MOVING operation ignored"
	TrackingMovingOperationMessage   = "tracking MOVING operation"
	UntrackingMovingOperationMessage = "untracking MOVING operation"
	OperationNotTrackedMessage       = "operation not tracked"
	FailedToRegisterHandlerMessage   = "failed to register handler"

	// ========================================
	// HOOKS.GO - Notification processing hooks
	// ========================================
	ProcessingNotificationMessage          = "processing notification started"
	ProcessingNotificationFailedMessage    = "processing notification failed"
	ProcessingNotificationSucceededMessage = "processing notification succeeded"

	// ========================================
	// POOL_HOOK.GO - Pool connection management
	// ========================================
	FailedToQueueHandoffMessage = "failed to queue handoff"
	MarkedForHandoffMessage     = "connection marked for handoff"

	// ========================================
	// PUSH_NOTIFICATION_HANDLER.GO - Push notification validation and processing
	// ========================================
	InvalidNotificationFormatMessage              = "invalid notification format"
	InvalidNotificationTypeFormatMessage          = "invalid notification type format"
	InvalidSeqIDInMovingNotificationMessage       = "invalid seqID in MOVING notification"
	InvalidTimeSInMovingNotificationMessage       = "invalid timeS in MOVING notification"
	InvalidNewEndpointInMovingNotificationMessage = "invalid newEndpoint in MOVING notification"
	NoConnectionInHandlerContextMessage           = "no connection in handler context"
	InvalidConnectionTypeInHandlerContextMessage  = "invalid connection type in handler context"
	SchedulingHandoffToCurrentEndpointMessage     = "scheduling handoff to current endpoint"
	RelaxedTimeoutDueToNotificationMessage        = "applying relaxed timeout due to notification"
	UnrelaxedTimeoutMessage                       = "clearing relaxed timeout"
	ManagerNotInitializedMessage                  = "manager not initialized"
	FailedToMarkForHandoffMessage                 = "failed to mark connection for handoff"
	InvalidSeqIDInSMigratingNotificationMessage   = "invalid SeqID in SMIGRATING notification"
	InvalidSeqIDInSMigratedNotificationMessage    = "invalid SeqID in SMIGRATED notification"
	TriggeringClusterStateReloadMessage           = "triggering cluster state reload"

	// ========================================
	// used in pool/conn
	// ========================================
	UnrelaxedTimeoutAfterDeadlineMessage = "clearing relaxed timeout after deadline"
)

Functions

ApplyingRelaxedTimeoutDueToPostHandoff

func ApplyingRelaxedTimeoutDueToPostHandoff(connID uint64, timeout interface{}, until string) string

CannotQueueHandoffForRetry

func CannotQueueHandoffForRetry(err error) string

CircuitBreakerCleanup

func CircuitBreakerCleanup(removed int, total int) string

CircuitBreakerClosed

func CircuitBreakerClosed(endpoint string, successes int64) string

CircuitBreakerOpen

func CircuitBreakerOpen(connID uint64, endpoint string) string

Circuit breaker functions

CircuitBreakerOpened

func CircuitBreakerOpened(endpoint string, failures int64) string

CircuitBreakerReopened

func CircuitBreakerReopened(endpoint string) string

CircuitBreakerTransitioningToHalfOpen

func CircuitBreakerTransitioningToHalfOpen(endpoint string) string

Circuit breaker additional functions

ConfigDebug

func ConfigDebug(config interface{}) string

ConnectionNotMarkedForHandoff

func ConnectionNotMarkedForHandoff(connID uint64) string

Additional handoff functions for specific cases

ConnectionNotMarkedForHandoffError

func ConnectionNotMarkedForHandoffError(connID uint64) string

DebugLoggingEnabled

func DebugLoggingEnabled() string

Configuration and debug functions

DuplicateMovingOperation

func DuplicateMovingOperation(connID uint64, endpoint string, seqID int64) string

Moving operation tracking functions

ExtractDataFromLogMessage

func ExtractDataFromLogMessage(logMessage string) map[string]interface{}

ExtractDataFromLogMessage extracts structured data from maintnotifications log messages Returns a map containing the parsed key-value pairs from the structured data section Example: "conn[123] handoff started to localhost:6379 {"connID":123,"endpoint":"localhost:6379"}" Returns: map[string]interface{}{"connID": 123, "endpoint": "localhost:6379"}

FailedToDialNewEndpoint

func FailedToDialNewEndpoint(connID uint64, endpoint string, err error) string

FailedToMarkForHandoff

func FailedToMarkForHandoff(connID uint64, err error) string

FailedToQueueHandoff

func FailedToQueueHandoff(connID uint64, err error) string

FailedToRegisterHandler

func FailedToRegisterHandler(notificationType string, err error) string

HandoffFailed

func HandoffFailed(connID uint64, newEndpoint string, attempt int, maxAttempts int, err error) string

HandoffQueueFull

func HandoffQueueFull(queueLen, queueCap int) string

Handoff queue and marking functions

HandoffQueueFullError

func HandoffQueueFullError() string

HandoffRetryAttempt

func HandoffRetryAttempt(connID uint64, retries int, newEndpoint string, oldEndpoint string) string

HandoffStarted

func HandoffStarted(connID uint64, newEndpoint string) string

HandoffSucceeded

func HandoffSucceeded(connID uint64, newEndpoint string) string

InvalidCircuitBreakerFailureThresholdError

func InvalidCircuitBreakerFailureThresholdError() string

InvalidCircuitBreakerMaxRequestsError

func InvalidCircuitBreakerMaxRequestsError() string

InvalidCircuitBreakerResetTimeoutError

func InvalidCircuitBreakerResetTimeoutError() string

InvalidClientError

func InvalidClientError() string

InvalidConnectionTypeInHandlerContext

func InvalidConnectionTypeInHandlerContext(notificationType string, conn interface{}, handlerCtx interface{}) string

InvalidEndpointTypeError

func InvalidEndpointTypeError() string

InvalidHandoffQueueSizeError

func InvalidHandoffQueueSizeError() string

InvalidHandoffRetriesError

func InvalidHandoffRetriesError() string

InvalidHandoffTimeoutError

func InvalidHandoffTimeoutError() string

InvalidHandoffWorkersError

func InvalidHandoffWorkersError() string

InvalidMaintNotificationsError

func InvalidMaintNotificationsError() string

InvalidNewEndpointInMovingNotification

func InvalidNewEndpointInMovingNotification(newEndpoint interface{}) string

InvalidNotification

func InvalidNotification(notificationType string, notification interface{}) string

InvalidNotification creates a log message for invalid notifications of any type

InvalidNotificationError

func InvalidNotificationError() string

InvalidNotificationFormat

func InvalidNotificationFormat(notification interface{}) string

Validation and error functions

InvalidNotificationTypeFormat

func InvalidNotificationTypeFormat(notificationType interface{}) string

InvalidPostHandoffRelaxedDurationError

func InvalidPostHandoffRelaxedDurationError() string

InvalidRelaxedTimeoutError

func InvalidRelaxedTimeoutError() string

Configuration validation error functions

InvalidSeqIDInMovingNotification

func InvalidSeqIDInMovingNotification(seqID interface{}) string

InvalidSeqIDInSMigratedNotification

func InvalidSeqIDInSMigratedNotification(seqID interface{}) string

InvalidSeqIDInSMigratingNotification

func InvalidSeqIDInSMigratingNotification(seqID interface{}) string

Cluster notification functions

InvalidTimeSInMovingNotification

func InvalidTimeSInMovingNotification(timeS interface{}) string

ManagerNotInitialized

func ManagerNotInitialized() string

MarkedForHandoff

func MarkedForHandoff(connID uint64) string

Pool hook functions

MaxHandoffRetriesReachedError

func MaxHandoffRetriesReachedError() string

MetricsHookProcessingNotification

func MetricsHookProcessingNotification(notificationType string, connID uint64) string

Example hooks functions

MetricsHookRecordedError

func MetricsHookRecordedError(notificationType string, connID uint64, err error) string

NoConnectionInHandlerContext

func NoConnectionInHandlerContext(notificationType string) string

NoPoolProvidedCannotRemove

func NoPoolProvidedCannotRemove(connID uint64, reason error) string

OperationNotTracked

func OperationNotTracked(connID uint64, seqID int64) string

ProcessingNotification

func ProcessingNotification(connID uint64, seqID int64, notificationType string, notification interface{}) string

Notification processing functions

ProcessingNotificationFailed

func ProcessingNotificationFailed(connID uint64, notificationType string, err error, notification interface{}) string

ProcessingNotificationSucceeded

func ProcessingNotificationSucceeded(connID uint64, notificationType string) string

ReachedMaxHandoffRetries

func ReachedMaxHandoffRetries(connID uint64, endpoint string, maxRetries int) string

RelaxedTimeoutDueToNotification

func RelaxedTimeoutDueToNotification(connID uint64, notificationType string, timeout interface{}) string

Timeout-related log functions

RemovingConnectionFromPool

func RemovingConnectionFromPool(connID uint64, reason error) string

Connection pool functions

SchedulingHandoffToCurrentEndpoint

func SchedulingHandoffToCurrentEndpoint(connID uint64, seconds float64) string

ShutdownError

func ShutdownError() string

TrackingMovingOperation

func TrackingMovingOperation(connID uint64, endpoint string, seqID int64) string

TriggeringClusterStateReload

func TriggeringClusterStateReload(seqID int64, hostPort string, slotRanges []string) string

TriggeringClusterStateReload logs when cluster state reload is triggered (deduplicated, once per seqID)

UnrelaxedTimeout

func UnrelaxedTimeout(connID uint64) string

UnrelaxedTimeoutAfterDeadline

func UnrelaxedTimeoutAfterDeadline(connID uint64) string

UntrackingMovingOperation

func UntrackingMovingOperation(connID uint64, seqID int64) string

WorkerExitingDueToInactivityTimeout

func WorkerExitingDueToInactivityTimeout(timeout interface{}) string

WorkerExitingDueToShutdown

func WorkerExitingDueToShutdown() string

Handoff worker functions

WorkerExitingDueToShutdownWhileProcessing

func WorkerExitingDueToShutdownWhileProcessing() string

WorkerPanicRecovered

func WorkerPanicRecovered(panicValue interface{}) string

Dependency graph