Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.datastax.driver.core.exceptions.DriverInternalError;
import com.datastax.driver.core.exceptions.InvalidQueryException;
import com.datastax.driver.core.exceptions.NoHostAvailableException;
import com.datastax.driver.core.exceptions.ServerError;
import com.datastax.driver.core.exceptions.UnsupportedProtocolVersionException;
import com.datastax.driver.core.utils.MoreFutures;
import com.datastax.driver.core.utils.MoreObjects;
Expand Down Expand Up @@ -707,9 +708,13 @@ public void onSuccess(ResultSet result) {

@Override
public void onFailure(Throwable t) {
// downgrade to system.peers if we get an invalid query as this indicates
// the peers_v2 table does not exist.
if (t instanceof InvalidQueryException) {
// Downgrade to system.peers if we get an invalid query error as this indicates the
// peers_v2 table does not exist.
// Also downgrade on server error with a specific error message (DSE 6.0.0 to 6.0.2
// with search enabled.
if (t instanceof InvalidQueryException
|| (t instanceof ServerError
&& t.getMessage().contains("Unknown keyspace/cf pair (system.peers_v2)"))) {
isPeersV2 = false;
MoreFutures.propagateFuture(peersFuture, selectPeersFuture(connection));
} else {
Expand Down