Skip to content

Commit

Permalink
propagates the new contact-info through gossip (#34092)
Browse files Browse the repository at this point in the history
Working towards migrating from legacy contact-info to the new
contact-info:
#29596
  • Loading branch information
behzadnouri authored Nov 15, 2023
1 parent 67dab71 commit ba0a49b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions gossip/src/crds_gossip_pull.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use {
crds::{Crds, GossipRoute, VersionedCrdsValue},
crds_gossip,
crds_gossip_error::CrdsGossipError,
crds_value::{CrdsData, CrdsValue},
crds_value::CrdsValue,
legacy_contact_info::LegacyContactInfo as ContactInfo,
ping_pong::PingCache,
},
Expand Down Expand Up @@ -488,11 +488,6 @@ impl CrdsGossipPull {
let out: Vec<_> = crds
.filter_bitmask(filter.mask, filter.mask_bits)
.filter(pred)
.filter(|entry| {
// Exclude the new ContactInfo from the pull responses
// until the cluster has upgraded.
!matches!(&entry.value.data, CrdsData::ContactInfo(_))
})
.map(|entry| entry.value.clone())
.take(output_size_limit.load(Ordering::Relaxed).max(0) as usize)
.collect();
Expand Down
7 changes: 1 addition & 6 deletions gossip/src/crds_gossip_push.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use {
cluster_info::{Ping, CRDS_UNIQUE_PUBKEY_CAPACITY},
crds::{Crds, CrdsError, Cursor, GossipRoute},
crds_gossip,
crds_value::{CrdsData, CrdsValue},
crds_value::CrdsValue,
ping_pong::PingCache,
push_active_set::PushActiveSet,
received_cache::ReceivedCache,
Expand Down Expand Up @@ -191,11 +191,6 @@ impl CrdsGossipPush {
let crds = crds.read().unwrap();
let entries = crds
.get_entries(crds_cursor.deref_mut())
.filter(|entry| {
// Exclude the new ContactInfo from outgoing push messages
// until the cluster has upgraded.
!matches!(&entry.value.data, CrdsData::ContactInfo(_))
})
.map(|entry| &entry.value)
.filter(|value| wallclock_window.contains(&value.wallclock()));
for value in entries {
Expand Down

0 comments on commit ba0a49b

Please sign in to comment.