-
Notifications
You must be signed in to change notification settings - Fork 27
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
Conversation
fc12d17
to
9d8ef7d
Compare
9d8ef7d
to
2350d6c
Compare
crates/daphne/src/lib.rs
Outdated
@@ -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 { |
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.
why are you checking that max_batch_size != 0 here?
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.
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
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.
Small nit picks around shorter ways to convert between numeric types
80853d8
to
96fc4ee
Compare
96fc4ee
to
49da542
Compare
Draft-12 removes
max_batch_size
from "fixed-size" batch mode. This PR removesmax_batch_size
from the wire format, and sets the value to 0 forLatest
, which, per taskprov-00, the last version to featuremax_batch_size
, signals that there is nomax_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 fromtaskprov
.