Skip to content

Commit fb10205

Browse files
authored
Update default value and documentation of advanced.metadata.schema.request-timeout (#404)
Updates the default value of `advanced.metadata.schema.request-timeout` corresponding to `METADATA_SCHEMA_REQUEST_TIMEOUT` TypedDriverOption to 20 seconds. Extends the documentation with information about additional function in Scylla clusters.
1 parent 47477e5 commit fb10205

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

core/src/main/java/com/datastax/oss/driver/api/core/config/OptionsMap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ protected static void fillWithDriverDefaults(OptionsMap map) {
352352
map.put(
353353
TypedDriverOption.METADATA_SCHEMA_REFRESHED_KEYSPACES,
354354
ImmutableList.of("!system", "!/^system_.*/", "!/^dse_.*/", "!solr_admin", "!OpsCenter"));
355-
map.put(TypedDriverOption.METADATA_SCHEMA_REQUEST_TIMEOUT, requestTimeout);
355+
map.put(TypedDriverOption.METADATA_SCHEMA_REQUEST_TIMEOUT, Duration.ofSeconds(20));
356356
map.put(TypedDriverOption.METADATA_SCHEMA_REQUEST_PAGE_SIZE, requestPageSize);
357357
map.put(TypedDriverOption.METADATA_SCHEMA_WINDOW, Duration.ofSeconds(1));
358358
map.put(TypedDriverOption.METADATA_SCHEMA_MAX_EVENTS, 20);

core/src/main/resources/reference.conf

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2025,11 +2025,19 @@ datastax-java-driver {
20252025

20262026
# The timeout for the requests to the schema tables.
20272027
#
2028+
# For Scylla clusters this functions as both driver and server-side timeout.
2029+
# Schema queries for Scylla will have "using timeout <duration>" clause added, overriding the default
2030+
# server-side timeout for queries.
2031+
# For other clusters, this is a driver-side timeout.
2032+
#
2033+
# The default value is set very high, however in regular cases schema queries should
2034+
# only take a small fraction of that.
2035+
#
20282036
# Required: yes
20292037
# Modifiable at runtime: yes, the new value will be used for refreshes issued after the
20302038
# change.
20312039
# Overridable in a profile: no
2032-
request-timeout = ${datastax-java-driver.basic.request.timeout}
2040+
request-timeout = 20 seconds
20332041

20342042
# The page size for the requests to the schema tables.
20352043
#

0 commit comments

Comments
 (0)