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

Remove max_batch_size from Latest #723

Merged
merged 1 commit into from
Nov 27, 2024
Merged

Conversation

jhoyla
Copy link
Contributor

@jhoyla jhoyla commented Nov 25, 2024

Draft-12 removes max_batch_size from "fixed-size" batch mode. This PR removes max_batch_size from the wire format, and sets the value to 0 for Latest, which, per taskprov-00, the last version to feature max_batch_size, signals that there is no max_batch_size.

This PR also makes max_batch_size the same type, u32, everywhere in the code. The DAP spec doesn't specify a size, so I've take the size from taskprov.

@jhoyla jhoyla force-pushed the jhoyla/remove-max-batch-size branch 3 times, most recently from fc12d17 to 9d8ef7d Compare November 25, 2024 15:24
@jhoyla jhoyla marked this pull request as ready for review November 25, 2024 15:43
@jhoyla jhoyla changed the base branch from main to jhoyla/remove-multibatch-collection November 25, 2024 16:12
Base automatically changed from jhoyla/remove-multibatch-collection to main November 26, 2024 10:14
@jhoyla jhoyla force-pushed the jhoyla/remove-max-batch-size branch from 9d8ef7d to 2350d6c Compare November 26, 2024 10:19
@@ -732,7 +732,7 @@ impl DapTaskConfig {
DapQueryConfig::FixedSize {
max_batch_size: Some(max_batch_size),
} => {
if report_count > max_batch_size {
if (report_count > u64::from(max_batch_size)) && max_batch_size != 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

why are you checking that max_batch_size != 0 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Per the old draft a max_batch_size of 0 means there is no limit.

The maximum batch size for fixed_size query is optional. If query_type is fixed_size and max_batch_size is 0, then the task does not have maximum batch size limit.

https://datatracker.ietf.org/doc/html/draft-ietf-ppm-dap-taskprov-00#section-3.1-7

Copy link
Collaborator

@mendess mendess left a comment

Choose a reason for hiding this comment

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

Small nit picks around shorter ways to convert between numeric types

crates/dapf/src/acceptance/mod.rs Outdated Show resolved Hide resolved
crates/daphne/src/lib.rs Outdated Show resolved Hide resolved
crates/daphne/src/messages/taskprov.rs Outdated Show resolved Hide resolved
@jhoyla jhoyla force-pushed the jhoyla/remove-max-batch-size branch 2 times, most recently from 80853d8 to 96fc4ee Compare November 27, 2024 14:58
@jhoyla jhoyla force-pushed the jhoyla/remove-max-batch-size branch from 96fc4ee to 49da542 Compare November 27, 2024 15:09
@jhoyla jhoyla merged commit 1550a14 into main Nov 27, 2024
3 checks passed
@jhoyla jhoyla deleted the jhoyla/remove-max-batch-size branch November 27, 2024 15:17
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.

3 participants