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

Add Fixed-Rate Polling Specifier To ReportCollector #1492

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

tyurek
Copy link
Collaborator

@tyurek tyurek commented Dec 12, 2024

To test this, I added .args(["--set-fixed-polling-ms", "100"]) before line 93 in the file containing test_hybrid(). I also verified that it fails with bad arguments

Test ran with cargo test --package ipa-core --test hybrid --no-default-features --features "cli compact-gate web-app real-world-infra test-fixture relaxed-dp multi-threading" -- test_hybrid --exact

I should say this usually passes... I ran it once (with the argument specified) and got

Unable to create query!: FailedHttpRequest { dest: "localhost:64473", status: 500, reason: "500 Internal Server Error: One or more peers rejected the request: [(ShardIndex(3), ShardError { shard_index: ShardIndex(0), source: ConnectError { dest: \"localhost:64493\", inner: hyper_util::client::legacy::Error(Connect, Custom { kind: Other, error: Custom { kind: InvalidData, error: InvalidMessage(InvalidContentType) } }) } })]" }

But I don't think that's due to any incorrect logic in this PR

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.

Project coverage is 93.27%. Comparing base (4f112ad) to head (53b6198).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
ipa-core/src/cli/playbook/hybrid.rs 0.00% 7 Missing ⚠️
ipa-core/src/bin/report_collector.rs 0.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1492      +/-   ##
==========================================
- Coverage   93.29%   93.27%   -0.03%     
==========================================
  Files         237      237              
  Lines       43510    43518       +8     
==========================================
- Hits        40592    40590       -2     
- Misses       2918     2928      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

// If set, use the specified fixed polling interval when running a query.
// Otherwise, use exponential backoff.
#[arg(long, default_value_t = 0)]
set_fixed_polling_ms: u64,
Copy link
Collaborator

@akoshelev akoshelev Dec 12, 2024

Choose a reason for hiding this comment

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

is Option<u64> better to represent this value being not set?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

oh, yeah, probably

Copy link
Collaborator

@akoshelev akoshelev left a comment

Choose a reason for hiding this comment

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

Setting interval in millis is not great but probably the best we can do without polling extra crates. Humans tend to make typo errors when entering large numbers and if we want to poll every 5 mins, 300000 vs 30000 makes a big difference

@tyurek
Copy link
Collaborator Author

tyurek commented Dec 12, 2024

Setting interval in millis is not great but probably the best we can do without polling extra crates. Humans tend to make typo errors when entering large numbers and if we want to poll every 5 mins, 300000 vs 30000 makes a big difference

Are we expecting to have large polling intervals like that?

@tyurek tyurek merged commit 3438da1 into private-attribution:main Dec 12, 2024
10 checks passed
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.

2 participants