code: @Override
    public RetryDecision onWriteTimeout(
        @NonNull Request request,
        @NonNull ConsistencyLevel cl,
        @NonNull WriteType writeType,
        int blockFor,
        int received,
        int retryCount) {
  
      RetryDecision decision =
          (retryCount == 0 && writeType == DefaultWriteType.BATCH_LOG)
              ? RetryDecision.RETRY_SAME
              : RetryDecision.RETHROW;
  
      if (decision == RetryDecision.RETRY_SAME && LOG.isTraceEnabled()) {
        LOG.trace(
            RETRYING_ON_WRITE_TIMEOUT, logPrefix, cl, writeType, blockFor, received, retryCount);
      }
      return decision;
    }
docs: {@inheritDoc}
  
  <p>This implementation triggers a maximum of one retry (to the same node), and only for a
  {@code WriteType.BATCH_LOG} write. The reasoning is that the coordinator tries to write the
  distributed batch log against a small subset of nodes in the local datacenter; a timeout
  usually means that none of these nodes were alive but the coordinator hadn't detected them as
  dead yet. By the time we get the timeout, the dead nodes will likely have been detected as
  dead, and the retry has thus a high chance of success.
  
  <p>Otherwise, the exception is rethrown.