{"record":{"id":"92015b89911b8471","repo":"redis/jedis","slug":"string-valueof-event","errorCode":null,"errorMessage":"String.valueOf(event)","messagePattern":"String\\.valueOf\\(event\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"src/main/java/redis/clients/jedis/mcf/MultiDbConnectionProvider.java","lineNumber":332,"sourceCode":"    }\n  }\n\n  /**\n   * Internal method to add a database configuration. This method is not thread-safe and should be\n   * called within appropriate locks.\n   */\n  private void addDatabaseInternal(MultiDbConfig multiDbConfig, DatabaseConfig config) {\n    if (databaseMap.containsKey(config.getEndpoint())) {\n      throw new JedisValidationException(\n          \"Endpoint \" + config.getEndpoint() + \" already exists in the provider\");\n    }\n\n    String databaseId = \"database:\" + config.getEndpoint();\n\n    Retry retry = RetryRegistry.of(retryConfig).retry(databaseId);\n\n    Retry.EventPublisher retryPublisher = retry.getEventPublisher();\n    retryPublisher.onRetry(event -> log.warn(String.valueOf(event)));\n    retryPublisher.onError(event -> log.error(String.valueOf(event)));\n\n    CircuitBreaker circuitBreaker = CircuitBreakerRegistry.of(circuitBreakerConfig)\n        .circuitBreaker(databaseId);\n\n    CircuitBreaker.EventPublisher circuitBreakerEventPublisher = circuitBreaker.getEventPublisher();\n    circuitBreakerEventPublisher.onCallNotPermitted(event -> log.error(String.valueOf(event)));\n    circuitBreakerEventPublisher.onError(event -> log.error(String.valueOf(event)));\n    circuitBreakerEventPublisher.onFailureRateExceeded(event -> log.error(String.valueOf(event)));\n    circuitBreakerEventPublisher.onSlowCallRateExceeded(event -> log.error(String.valueOf(event)));\n\n    TrackingConnectionPool pool = TrackingConnectionPool.builder()\n        .hostAndPort(hostPort(config.getEndpoint())).clientConfig(config.getJedisClientConfig())\n        .maintenanceNotificationsConfig(config.getMaintenanceNotificationsConfig())\n        .poolConfig(config.getConnectionPoolConfig()).cache(cache).build();\n\n    Database database;\n    StrategySupplier strategySupplier = config.getHealthCheckStrategySupplier();","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/redis/jedis/blob/6dac31d4c224fb3257c216f3985340c6f500cdcb/src/main/java/redis/clients/jedis/mcf/MultiDbConnectionProvider.java#L314-L350","documentation":"In MultiDbConnectionProvider.addDatabaseInternal, a Resilience4j Retry EventPublisher is wired so retry events are logged: onRetry logs at WARN and onError logs at ERROR, both via String.valueOf(event). This line is the source of the log text, not an exception — it surfaces retry attempts/failures against a database endpoint.","triggerScenarios":"Any command execution against the configured database that Resilience4j retries — each retry emits a RetryEvent.OnRetry log, and exhausted/failed retries emit RetryEvent.OnError logs.","commonSituations":"Failover scenarios where the active database endpoint is down or timing out and the provider retries before/while switching databases; transient network errors under maxRetryAttempts/-1 multi-db configuration.","solutions":["Check the endpoint named in 'database:<endpoint>' — retries usually mean that Redis is down or slow; verify connectivity.","Tune RetryConfig (maxAttempts, waitDuration) in MultiDbClient builder to balance failover speed vs. retry volume.","Verify failover is configured (active/passive) so traffic moves to a healthy database after retries fail.","Inspect paired circuit-breaker events in the same logs to see whether the endpoint was opened."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// before building the client, verify endpoints are reachable\nfor (HostAndPort ep : endpoints) {\n  try (Socket s = new Socket()) {\n    s.connect(new InetSocketAddress(ep.getHost(), ep.getPort()), 2000);\n  } catch (IOException e) {\n    log.warn(\"Endpoint unreachable, expect retries: \" + ep);\n  }\n}","typeGuard":null,"tryCatchPattern":"// these are log events, not exceptions; monitor them instead\nretryPublisher.onRetry(e -> metrics.increment(\"db.retry\", tags));\nretryPublisher.onError(e -> alerting.fire(\"db.retry.exhausted\", e));","preventionTips":["Monitor the 'database:<endpoint>' WARN/ERROR logs as an endpoint-health signal.","Configure health checks and failover so retries hand off to a healthy database.","Tune RetryConfig maxAttempts/waitDuration to bound retry storms."],"tags":["retry","resilience4j","failover","multidb","logging"],"backgroundTag":"retry-limit-exceeded","analyzedSha":"6dac31d4c224fb3257c216f3985340c6f500cdcb","analyzedAt":"2026-09-08T04:55:01.204Z","contentChangedAt":"2026-09-08T04:55:01.204Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}