-
-
Notifications
You must be signed in to change notification settings - Fork 1
ingest-router: publickeys endpoint #107
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
Conversation
| // Extract requested relay_ids from the request | ||
| let request_data: PublicKeysRequest = deserialize_body(body.clone())?; | ||
| let requested_relay_ids: HashSet<String> = request_data.relay_ids.into_iter().collect(); | ||
|
|
||
| // Send the request to all cells | ||
| let cell_requests = cells | ||
| .cell_list() | ||
| .iter() | ||
| .map(|cell_id| { | ||
| let req = Request::from_parts(parts.clone(), body.clone()); | ||
| (cell_id.clone(), req) | ||
| }) | ||
| .collect(); | ||
|
|
||
| let metadata = Box::new(PublicKeysMetadata { | ||
| requested_relay_ids, | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to do a fanout here. We could fetch from any cell instead. We'll be replicating the data that this endpoint reads into all cells as part of relay's registration flows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright. that makes things easier
did it that way in #109
alternative to #107 with this option, sentry replicates the data so AnyCellHandler is fine as each cell returns a complete result
alternative to #107 with this option, sentry replicates the data so AnyCellHandler is fine as each cell returns a complete result
this endpoint implements a fanout and merge strategy.
unlike project configs, partial responses are not really valid, so we only return a successful merged response under two conditions: