Elffuss BraidHub

kikocis/java-driver public

Don't mark connection defunct on client timeout (reverts JAVA-425).
Changesetc891a2504bbcfb1db37d18fa420588832330de64112aa77f96695c5d1ee4deb7
Authorolim7t <omichallat+github@gmail.com> · 2015-04-17 23:09 +02:00
Committerolim7t <omichallat+github@gmail.com> · 2015-04-17 23:11 +02:00
Parentsd148d19e0bb5

Browse the files at this changeset

2 files changed

modified driver-core/CHANGELOG.rst +2 −0
@@ -41,6 +41,8 @@
4141 - [improvement] Make connection and pool creation fully async (JAVA-692)
4242 - [improvement] Optimize connection use after reconnection (JAVA-505)
4343 - [improvement] Remove "suspected" mechanism (JAVA-617)
44+- [improvement] Don't mark connection defunct on client timeout (reverts
45+ JAVA-425)
4446
4547 Merged from 2.0.9_fixes branch:
4648
modified driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java +2 −6
@@ -571,7 +571,7 @@
571571 }
572572 setFinalException(connection, exception);
573573 } catch (Exception e) {
574- // This shouldn't happen, but if it does, we want to signal the callback, not let him hang indefinitively
574+ // This shouldn't happen, but if it does, we want to signal the callback, not let it hang indefinitely
575575 setFinalException(null, new DriverInternalError("An unexpected error happened while handling exception " + exception, e));
576576 } finally {
577577 if (queriedHost != null && statement != Statement.DEFAULT)
@@ -590,16 +590,12 @@
590590 }
591591
592592 Host queriedHost = current;
593- // If a query times out, we consider that the host is unstable, so we defunct
594- // the connection to mark it down.
595593 OperationTimedOutException timeoutException = new OperationTimedOutException(connection.address);
596594 try {
597- connection.defunct(timeoutException);
598-
599595 logError(connection.address, timeoutException);
600596 retry(false, null);
601597 } catch (Exception e) {
602- // This shouldn't happen, but if it does, we want to signal the callback, not let him hang indefinitively
598+ // This shouldn't happen, but if it does, we want to signal the callback, not let it hang indefinitely
603599 setFinalException(null, new DriverInternalError("An unexpected error happened while handling timeout", e));
604600 } finally {
605601 if (queriedHost != null && statement != Statement.DEFAULT)