Skip to content

Commit

Permalink
Merge branch 'main' into cassandra_mock_bench
Browse files Browse the repository at this point in the history
  • Loading branch information
rukai authored Feb 9, 2023
2 parents 7955d92 + bec920f commit aefe54c
Show file tree
Hide file tree
Showing 10 changed files with 203 additions and 153 deletions.
336 changes: 188 additions & 148 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions shotover-proxy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ cassandra-cpp-driver-tests = ["test-helpers/cassandra-cpp-driver-tests"]
[dependencies]
pretty-hex = "0.3.0"
hex = "0.4.3"
tokio = { version = "1.21.1", features = ["full", "macros"] }
tokio = { version = "1.25.0", features = ["full", "macros"] }
tokio-util = { version = "0.7.0" }
tokio-stream = "0.1.2"
bytes = "1.0.0"
Expand Down Expand Up @@ -85,7 +85,7 @@ redis = { version = "0.22.0", features = ["tokio-comp", "cluster"] }
pcap = "1.0.0"
pktparse = { version = "0.7.0", features = ["serde"] }
tls-parser = "0.11.0"
serial_test = "0.10.0"
serial_test = "1.0.0"
cassandra-cpp = { version = "1.2.0" }
test-helpers = { path = "../test-helpers", features = ["cassandra-cpp-driver-tests"] }
hex-literal = "0.3.3"
Expand Down
2 changes: 2 additions & 0 deletions shotover-proxy/src/frame/cassandra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ impl CassandraFrame {
CassandraResult::SchemaChange(Box::new(schema_change)),
),
ResResultBody::Void => CassandraOperation::Result(CassandraResult::Void),
_ => unreachable!(),
}
} else {
unreachable!("We already know the operation is a result")
Expand Down Expand Up @@ -349,6 +350,7 @@ impl CassandraFrame {
Opcode::AuthChallenge => CassandraOperation::AuthChallenge(frame.body),
Opcode::AuthResponse => CassandraOperation::AuthResponse(frame.body),
Opcode::AuthSuccess => CassandraOperation::AuthSuccess(frame.body),
_ => unreachable!(),
};

Ok(CassandraFrame {
Expand Down
1 change: 1 addition & 0 deletions shotover-proxy/src/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ impl MessageValue {
MessageValue::Tuple(value_list)
}
CassandraType::Null => MessageValue::Null,
_ => unreachable!(),
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1372,6 +1372,7 @@ impl Transform for CassandraSinkCluster {
ServerEvent::TopologyChange(_) => false,
ServerEvent::StatusChange(_) => false,
ServerEvent::SchemaChange(_) => true,
_ => unreachable!(),
}
} else {
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,15 @@ async fn topology_task_process(
return Ok(());
}
}
_ => unreachable!(),
},
ServerEvent::StatusChange(status) => {
for node in &mut nodes {
if node.address == status.addr {
node.is_up = match status.change_type {
StatusChangeType::Up => true,
StatusChangeType::Down => false,
_ => unreachable!(),
}
}
}
Expand All @@ -171,6 +173,7 @@ async fn topology_task_process(
return Ok(());
}
}
_ => unreachable!(),
}
}
}
Expand Down
1 change: 1 addition & 0 deletions shotover-proxy/tests/cassandra_int_tests/collections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ fn get_type_str(col_type: ColType) -> &'static str {
ColType::Udt => "udt",
ColType::Tuple => "tuple",
ColType::Duration => "duration",
_ => unreachable!(),
}
}

Expand Down
4 changes: 2 additions & 2 deletions test-helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ cassandra-protocol = { git = "https://github.com/krojew/cdrs-tokio", branch = "8
cassandra-cpp = { version = "1.2.0", optional = true }
openssl = { version = "0.10.36", features = ["vendored"] }
bytes = "1.0.0"
scylla = { git = "https://github.com/scylladb/scylla-rust-driver", features = ["ssl"] }
scylla = { version = "0.7.0", features = ["ssl"] }
ordered-float = { version = "3.0.0", features = ["serde"] }
tokio = { version = "1.21.1", features = ["full", "macros"] }
tokio = { version = "1.25.0", features = ["full", "macros"] }
uuid = { version = "1.0.0", features = ["serde", "v4"] }
redis = { version = "0.22.0", features = ["tokio-comp", "cluster"] }
tokio-io-timeout = "1.1.1"
Expand Down
2 changes: 2 additions & 0 deletions test-helpers/src/connection/cassandra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,7 @@ impl CassandraConnection {
ResResultBody::SchemaChange(_) => vec![],
ResResultBody::SetKeyspace(_) => vec![],
ResResultBody::Void => vec![],
_ => unreachable!(),
},
_ => todo!(),
})
Expand Down Expand Up @@ -916,6 +917,7 @@ impl ResultValue {
.collect(),
),
CassandraType::Null => ResultValue::Null,
_ => unreachable!(),
}
}

Expand Down
2 changes: 1 addition & 1 deletion tokio-bin-process/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ subprocess = "0.2.7"
anyhow = "1.0.42"
nix = "0.26.0"
rcgen = "0.10.0"
tokio = { version = "1.21.1", features = ["full", "macros"] }
tokio = { version = "1.25.0", features = ["full", "macros"] }
serde = { version = "1.0.111", features = ["derive"] }
serde_json = "1.0.89"
nu-ansi-term = "0.46.0"
Expand Down

0 comments on commit aefe54c

Please sign in to comment.