|
53 | 53 | import static org.neo4j.driver.internal.util.Futures.failedFuture;
|
54 | 54 |
|
55 | 55 | /**
|
56 |
| - * This class is used by all router tables to perform discovery. |
57 |
| - * In other words, the methods in this class could be called by multiple threads concurrently. |
| 56 | + * This class is used by all router tables to perform discovery. In other words, the methods in this class could be called by multiple threads concurrently. |
58 | 57 | */
|
59 | 58 | public class RediscoveryImpl implements Rediscovery
|
60 | 59 | {
|
61 | 60 | private static final String NO_ROUTERS_AVAILABLE = "Could not perform discovery for database '%s'. No routing server available.";
|
62 | 61 | private static final String RECOVERABLE_ROUTING_ERROR = "Failed to update routing table with server '%s'.";
|
| 62 | + private static final String RECOVERABLE_DISCOVERY_ERROR_WITH_SERVER = "Received a recoverable discovery error with server '%s', " + |
| 63 | + "will continue discovery with other routing servers if available. " + |
| 64 | + "Complete routing failures will be reported separately from this warning."; |
63 | 65 |
|
64 | 66 | private final BoltServerAddress initialRouter;
|
65 | 67 | private final RoutingSettings settings;
|
@@ -291,8 +293,9 @@ private ClusterComposition handleRoutingProcedureError( Throwable error, Routing
|
291 | 293 | // Retriable error happened during discovery.
|
292 | 294 | DiscoveryException discoveryError = new DiscoveryException( format( RECOVERABLE_ROUTING_ERROR, routerAddress ), error );
|
293 | 295 | Futures.combineErrors( baseError, discoveryError ); // we record each failure here
|
294 |
| - logger.warn( format( "Received a recoverable discovery error with server '%s', will continue discovery with other routing servers if available.", |
295 |
| - routerAddress ), discoveryError ); |
| 296 | + String warningMessage = format( RECOVERABLE_DISCOVERY_ERROR_WITH_SERVER, routerAddress ); |
| 297 | + logger.warn( warningMessage ); |
| 298 | + logger.debug( warningMessage, discoveryError ); |
296 | 299 | routingTable.forget( routerAddress );
|
297 | 300 | return null;
|
298 | 301 | }
|
|
0 commit comments