Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample cluster state from peer seeds #124

Closed
wants to merge 1 commit into from
Closed

Conversation

guilload
Copy link
Member

The idea is to allow fetching a few attributes (readiness, gRPC advertise address) from the peer seeds using sample_from_seeds to then download the cluster state directly via gRPC calls, and finally bootstrap our own state using insert_or_create_node.

.await?;

let mut seed_addrs: Vec<SocketAddr> = self.cluster_state.seed_addrs().into_iter().collect();
seed_addrs.shuffle(&mut rand::thread_rng());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the seeds are empty, we could try from self. WDYT?

Comment on lines +402 to +409
let node_state = self.cluster_state.node_state_mut(chitchat_id);

for (key, value) in key_values {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let node_state = self.cluster_state.node_state_mut(chitchat_id);
for (key, value) in key_values {
let node_state = self.cluster_state.node_state_mut(chitchat_id);
if node_state.hearbeat == 0 {
self.failure_detector.report_heartbeat(chitchat_id)?
}
for (key, value) in key_values {

report_unknown no longer exists. Would that work?

}

impl VersionedValue {
pub fn new(value: String, version: Version, is_tombstone: bool) -> VersionedValue {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For use in Quickwit.

@guilload guilload force-pushed the guilload/sample-message branch 3 times, most recently from 31d92bd to 7454650 Compare February 21, 2024 13:14
@guilload guilload force-pushed the guilload/sample-message branch from 7454650 to d461963 Compare February 21, 2024 14:20
@guilload guilload closed this Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant