Skip to content

Commit 16f5c34

Browse files
committed
Handle unexpected prepare write failures
1 parent 420c147 commit 16f5c34

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,14 @@ public void onSet(
833833
connection.release(true);
834834
logError(connection.endPoint, e);
835835
retry(false, null);
836+
} catch (RuntimeException e) {
837+
connection.release();
838+
logger.warn(
839+
"Unexpected error while preparing query on {} - [{}]. Find next host to query.",
840+
connection.endPoint,
841+
e.toString());
842+
logError(connection.endPoint, e);
843+
retry(false, null);
836844
}
837845
// we're done for now, the prepareAndRetry callback will handle the rest
838846
return;

0 commit comments

Comments
 (0)