|
34 | 34 | import java.util.Iterator;
|
35 | 35 | import java.util.List;
|
36 | 36 | import java.util.Set;
|
37 |
| -import java.util.concurrent.*; |
| 37 | +import java.util.concurrent.ConcurrentHashMap; |
| 38 | +import java.util.concurrent.ConcurrentMap; |
| 39 | +import java.util.concurrent.CopyOnWriteArrayList; |
| 40 | +import java.util.concurrent.TimeUnit; |
38 | 41 | import java.util.concurrent.atomic.AtomicBoolean;
|
39 | 42 | import java.util.concurrent.atomic.AtomicInteger;
|
40 | 43 | import java.util.concurrent.atomic.AtomicReference;
|
|
45 | 48 | */
|
46 | 49 | class RequestHandler {
|
47 | 50 | private static final Logger logger = LoggerFactory.getLogger(RequestHandler.class);
|
48 |
| - private static final AtomicBoolean WARNED_IDEMPOTENT = new AtomicBoolean(); |
49 | 51 |
|
50 | 52 | final String id;
|
51 | 53 |
|
@@ -377,7 +379,6 @@ private RetryPolicy.RetryDecision computeRetryDecisionOnRequestError(DriverExcep
|
377 | 379 | if (statement.isIdempotentWithDefault(manager.cluster.getConfiguration().getQueryOptions())) {
|
378 | 380 | decision = retryPolicy().onRequestError(statement, request().consistency(), exception, retriesByPolicy);
|
379 | 381 | } else {
|
380 |
| - logIdempotenceWarning(); |
381 | 382 | decision = RetryPolicy.RetryDecision.rethrow();
|
382 | 383 | }
|
383 | 384 | if (metricsEnabled()) {
|
@@ -537,7 +538,6 @@ public void onSet(Connection connection, Message.Response response, long latency
|
537 | 538 | wte.getReceivedAcknowledgements(),
|
538 | 539 | retriesByPolicy);
|
539 | 540 | else {
|
540 |
| - logIdempotenceWarning(); |
541 | 541 | retry = RetryPolicy.RetryDecision.rethrow();
|
542 | 542 | }
|
543 | 543 | if (metricsEnabled()) {
|
@@ -800,15 +800,6 @@ private void setFinalResult(Connection connection, Message.Response response) {
|
800 | 800 | }
|
801 | 801 | }
|
802 | 802 |
|
803 |
| - private void logIdempotenceWarning() { |
804 |
| - if (WARNED_IDEMPOTENT.compareAndSet(false, true)) |
805 |
| - logger.warn("Not retrying statement because it is not idempotent (this message will be logged only once). " + |
806 |
| - "Note that this version of the driver changes the default retry behavior for non-idempotent " + |
807 |
| - "statements: they won't be automatically retried anymore. The driver marks statements " + |
808 |
| - "non-idempotent by default, so you should explicitly call setIdempotent(true) if your statements " + |
809 |
| - "are safe to retry. See http://goo.gl/4HrSby for more details."); |
810 |
| - } |
811 |
| - |
812 | 803 | /**
|
813 | 804 | * The state of a SpeculativeExecution.
|
814 | 805 | * <p/>
|
|
0 commit comments