Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions changelog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ under the License.

### 4.19.2

- [improvement] Skip DSE protocol versions during automatic protocol negotiation
- [bug] CASSJAVA-116: Retry or Speculative Execution with RequestIdGenerator throws "Duplicate Key"

### 4.19.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ public ProtocolVersion fromName(String name) {

@Override
public ProtocolVersion highestNonBeta() {
ProtocolVersion highest = allVersions.get(allVersions.size() - 1);
// DSE protocol versions remain available when forced, but are never useful when negotiating
// with ScyllaDB.
DefaultProtocolVersion[] ossVersions = DefaultProtocolVersion.values();
ProtocolVersion highest = ossVersions[ossVersions.length - 1];
if (!highest.isBeta()) {
return highest;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ public void should_fail_to_find_version_by_name_different_case() {
.isInstanceOf(IllegalArgumentException.class);
}

@Test
public void should_pick_highest_non_beta_oss_version_for_negotiation() {
assertThat(registry.highestNonBeta()).isEqualTo(V5);
}

@Test
public void should_downgrade_if_lower_version_available() {
Optional<ProtocolVersion> downgraded = registry.downgrade(V4);
Expand Down
11 changes: 6 additions & 5 deletions manual/core/native_protocol/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,18 @@ first node the driver connects to:

*(1) for previous driver versions, see the [3.x documentation][driver3]*

Since version 4.5.0, the driver can also use DSE protocols when all nodes are running a version of
DSE. The table below shows the protocol matrix for these cases:
The driver can also use DSE protocols when they are explicitly configured. Automatic negotiation
only probes standard Cassandra protocol versions, to avoid attempting DSE protocols against
ScyllaDB. The table below shows the automatically negotiated versions for DSE:

| DSE version | Negotiated protocol version with driver 4 |
|---------------------|-------------------------------------------------|
| 4.7/4.8 | v3 |
| 5.0 | v4 |
| 5.1 | DSE_V1 ² |
| 6.0/6.7/6.8 | DSE_V2 ² |
| 5.1 | v4 |
| 6.0/6.7/6.8 | v4 |

*(2) DSE Protocols are chosen before other Cassandra native protocols.*
To use DSE-specific features, force `DSE_V1` or `DSE_V2` with `advanced.protocol.version`.

### Controlling the protocol version

Expand Down