Skip to content

Commit

Permalink
routing: remove Node struct
Browse files Browse the repository at this point in the history
Remove struct scylla::routing::Node from routing.rs. This structure
was introduced in 2020 in 1c8df89
and it is unused in our current code (and it looks like the original
commit didn't even use it at all). 

Moreover, this struct clashes with scylla::transport::Node making it
error-prone to find the wrong Node struct for a user of the driver. 
The deleted Node structure also relied solely on SocketAddr, while we 
want to identify the nodes by host_id (as in scylla::transport::Node).

Refs #660.
  • Loading branch information
avelanarius committed Jul 19, 2023
1 parent b845c63 commit fb90490
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions scylla/src/routing.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
use rand::Rng;
use std::collections::HashMap;
use std::convert::TryFrom;
use std::net::SocketAddr;
use std::num::NonZeroU16;
use thiserror::Error;

#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
pub struct Node {
// TODO: potentially a node may have multiple addresses, remember them?
// but we need an Ord instance on Node
pub addr: SocketAddr,
}

#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug)]
pub struct Token {
pub value: i64,
Expand Down

0 comments on commit fb90490

Please sign in to comment.