我已经从DSE 3.5升级到4.9到我的产品。已经注意到微服务功能的下降。 TPS下降了15%。在一定水平之后
com.datastax.oss.driver.api.core.DriverTimeoutException: Query timed out after PT2S at com.datastax.oss.driver.api.core.DriverTimeoutException.copy(DriverTimeoutException.java:34) at com.datastax.oss.driver.internal.core.util.concurrent.CompletableFutures.getUninterruptibly(CompletableFutures.java:149) at com.datastax.oss.driver.internal.core.cql.CqlRequestSyncProcessor.process(CqlRequestSyncProcessor.java:53) at com.datastax.oss.driver.internal.core.cql.CqlRequestSyncProces
实验性地将超时时间从默认的2秒增加到30秒。
则超时会按预期消失,但服务器有时会向客户端提供服务不可用503。
驱动程序配置:
final DriverConfigLoader configLoader = DriverConfigLoader.programmaticBuilder() .withString(DefaultDriverOption.REQUEST_CONSISTENCY, ConsistencyLevel.LOCAL_QUORUM.name()) .withString(DefaultDriverOption.RECONNECTION_POLICY_CLASS, ExponentialReconnectionPolicy.class.getName()) .withInt(DefaultDriverOption.RECONNECTION_BASE_DELAY, baseReconnectionIntervalSec * 1000) .withInt(DefaultDriverOption.RECONNECTION_MAX_DELAY, maxReconnectionIntervalSec * 1000) .withDuration(DefaultDriverOption.REQUEST_TIMEOUT, Duration.ofSeconds(30))//Test changes for driver timeout .withString(DefaultDriverOption.RETRY_POLICY_CLASS, CassandraCustomRetryPolicyXXXX.class.getName()).build();