> On June 10, 2014, 11:32 a.m., Dominic Hamon wrote:
> > include/mesos/mesos.proto, line 669
> > <https://reviews.apache.org/r/22425/diff/1/?file=606515#file606515line669>
> >
> >     It's not part of this review, but where (and why) does this ignoring 
> > happen?
> 
> Jiang Yan Xu wrote:
>     So the RateLimiter constructor takes an integer and a duration: 
> RateLimiter(int permits, const Duration& duration);
>     The configuration is in 'double' QPS.
>     
>     Converting the 'double QPS' into 'int permits' and 'duration' pair that 
> maintains the full precision of the 'double' value is not valuable enough to 
> justify the effort IMO so I chose to truncate the QPS value and give the user 
> a warning here...
>     
>     Thoughts?
> 
> Dominic Hamon wrote:
>     I understand, and that makes sense. How did you decide on 0.01? That 
> works out to 1 query every 100 seconds which seems like a very slow rate.
>     
>     Is it worth adding logging where you do the truncation if the user has 
> tried to specify something with more precision or, more likely, something 
> less than 0.01 that is then truncated to 0?

OK I meant that e.g. "500000" vs "500001" queries every 100 seconds (5000 vs 
5000.01 QPS) is as much as we can distinguish and we don't distinguish 
"5000002" and "5000004" queries per 1000 seconds (5000.002 vs 5000.004 QPS).

The 0.01 precision is what I thought reasonable but I guess a few more 
precision digits are fine? :)

Yes I agree I should add logging.
Perhaps I should throw an error when the specified QPS is below 0.01 (and 
certainly for zero and negative values as well)


- Jiang Yan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/22425/#review45266
-----------------------------------------------------------


On June 10, 2014, 11:15 a.m., Jiang Yan Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/22425/
> -----------------------------------------------------------
> 
> (Updated June 10, 2014, 11:15 a.m.)
> 
> 
> Review request for mesos, Ben Mahler, Dominic Hamon, and Vinod Kone.
> 
> 
> Bugs: MESOS-1443
>     https://issues.apache.org/jira/browse/MESOS-1443
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/mesos.proto 62f69d26ba0132156081eb7cfd0f16dd1b22913d 
>   src/master/flags.hpp 486335970ef05b345c5584ac012dde63437ef149 
>   src/master/master.hpp 26af1139a43a62b91712acd158b24a8977c81d3f 
>   src/master/master.cpp c18ccc4a1770cd68e4c3cb4b5f8ab912515ab613 
> 
> Diff: https://reviews.apache.org/r/22425/diff/
> 
> 
> Testing
> -------
> 
> make check (tested along with https://reviews.apache.org/r/22427)
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>

Reply via email to