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

Fetch all entries when listing assigned producers #5373

Merged
merged 2 commits into from
Apr 2, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions oximeter/collector/src/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,6 @@ impl OximeterAgent {
// A task which periodically updates our list of producers from Nexus.
async fn refresh_producer_list(agent: OximeterAgent, resolver: Resolver) {
let mut interval = tokio::time::interval(agent.refresh_interval);
let page_size = Some(NonZeroU32::new(100).unwrap());
loop {
interval.tick().await;
info!(agent.log, "refreshing list of producers from Nexus");
Expand All @@ -758,7 +757,9 @@ async fn refresh_producer_list(agent: OximeterAgent, resolver: Resolver) {
let client = nexus_client::Client::new(&url, agent.log.clone());
let mut stream = client.cpapi_assigned_producers_list_stream(
&agent.id,
page_size,
// This is a _total_ limit, not a page size, so `None` means "get
// all entries".
None,
Some(IdSortMode::IdAscending),
);
let mut expected_producers = BTreeMap::new();
Expand Down
Loading