@@ -242,6 +242,8 @@ private void readObject(ObjectInputStream stream) throws InvalidObjectException
242
242
}
243
243
244
244
protected static void fillWithDriverDefaults (OptionsMap map ) {
245
+ Duration initQueryTimeout = Duration .ofSeconds (5 );
246
+
245
247
// Sorted by order of appearance in reference.conf:
246
248
247
249
// Skip CONFIG_RELOAD_INTERVAL because the map-based config doesn't need periodic reloading
@@ -255,8 +257,8 @@ protected static void fillWithDriverDefaults(OptionsMap map) {
255
257
map .put (TypedDriverOption .LOAD_BALANCING_POLICY_SLOW_AVOIDANCE , true );
256
258
map .put (TypedDriverOption .SESSION_LEAK_THRESHOLD , 4 );
257
259
map .put (TypedDriverOption .CONNECTION_CONNECT_TIMEOUT , Duration .ofSeconds (5 ));
258
- map .put (TypedDriverOption .CONNECTION_INIT_QUERY_TIMEOUT , Duration . ofMillis ( 500 ) );
259
- map .put (TypedDriverOption .CONNECTION_SET_KEYSPACE_TIMEOUT , Duration . ofMillis ( 500 ) );
260
+ map .put (TypedDriverOption .CONNECTION_INIT_QUERY_TIMEOUT , initQueryTimeout );
261
+ map .put (TypedDriverOption .CONNECTION_SET_KEYSPACE_TIMEOUT , initQueryTimeout );
260
262
map .put (TypedDriverOption .CONNECTION_POOL_LOCAL_SIZE , 1 );
261
263
map .put (TypedDriverOption .CONNECTION_POOL_REMOTE_SIZE , 1 );
262
264
map .put (TypedDriverOption .CONNECTION_MAX_REQUESTS , 1024 );
@@ -324,7 +326,7 @@ protected static void fillWithDriverDefaults(OptionsMap map) {
324
326
map .put (TypedDriverOption .METRICS_NODE_EXPIRE_AFTER , Duration .ofHours (1 ));
325
327
map .put (TypedDriverOption .SOCKET_TCP_NODELAY , true );
326
328
map .put (TypedDriverOption .HEARTBEAT_INTERVAL , Duration .ofSeconds (30 ));
327
- map .put (TypedDriverOption .HEARTBEAT_TIMEOUT , Duration . ofMillis ( 500 ) );
329
+ map .put (TypedDriverOption .HEARTBEAT_TIMEOUT , initQueryTimeout );
328
330
map .put (TypedDriverOption .METADATA_TOPOLOGY_WINDOW , Duration .ofSeconds (1 ));
329
331
map .put (TypedDriverOption .METADATA_TOPOLOGY_MAX_EVENTS , 20 );
330
332
map .put (TypedDriverOption .METADATA_SCHEMA_ENABLED , true );
@@ -333,7 +335,7 @@ protected static void fillWithDriverDefaults(OptionsMap map) {
333
335
map .put (TypedDriverOption .METADATA_SCHEMA_WINDOW , Duration .ofSeconds (1 ));
334
336
map .put (TypedDriverOption .METADATA_SCHEMA_MAX_EVENTS , 20 );
335
337
map .put (TypedDriverOption .METADATA_TOKEN_MAP_ENABLED , true );
336
- map .put (TypedDriverOption .CONTROL_CONNECTION_TIMEOUT , Duration . ofMillis ( 500 ) );
338
+ map .put (TypedDriverOption .CONTROL_CONNECTION_TIMEOUT , initQueryTimeout );
337
339
map .put (TypedDriverOption .CONTROL_CONNECTION_AGREEMENT_INTERVAL , Duration .ofMillis (200 ));
338
340
map .put (TypedDriverOption .CONTROL_CONNECTION_AGREEMENT_TIMEOUT , Duration .ofSeconds (10 ));
339
341
map .put (TypedDriverOption .CONTROL_CONNECTION_AGREEMENT_WARN , true );
@@ -342,7 +344,7 @@ protected static void fillWithDriverDefaults(OptionsMap map) {
342
344
map .put (TypedDriverOption .REPREPARE_CHECK_SYSTEM_TABLE , false );
343
345
map .put (TypedDriverOption .REPREPARE_MAX_STATEMENTS , 0 );
344
346
map .put (TypedDriverOption .REPREPARE_MAX_PARALLELISM , 100 );
345
- map .put (TypedDriverOption .REPREPARE_TIMEOUT , Duration . ofMillis ( 500 ) );
347
+ map .put (TypedDriverOption .REPREPARE_TIMEOUT , initQueryTimeout );
346
348
map .put (TypedDriverOption .NETTY_DAEMON , false );
347
349
map .put (TypedDriverOption .NETTY_IO_SIZE , 0 );
348
350
map .put (TypedDriverOption .NETTY_IO_SHUTDOWN_QUIET_PERIOD , 2 );
0 commit comments