-
Notifications
You must be signed in to change notification settings - Fork 815
Handle the case of large step causing single pt extents #3818
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
Handle the case of large step causing single pt extents #3818
Conversation
I see that this improves the symptom, however it now does something undesirable: it makes two queries for parts of the range before and after the cached extent, with no gap between them since the extent is of zero width. |
We noticed that we were ignoring samples if the step is 24h and this fixes it. Signed-off-by: Goutham Veeramachaneni <[email protected]>
6385ee7
to
0c19b9d
Compare
@bboreham Handled the special case differently, WDYT? |
Still looks like it will do the same 2 queries. Try changing the test so the cached value is at 101. |
Wait how does this even work? Your test is for a zero-length range ( |
It happens when the step is more than 50% of the |
OK can you have different handling for AFAICS for a longer request your change will put back the conditions I was fixing in #3653 |
Basically when you have |
OK but this PR changes it for all requests. |
Ah, no it doesn't! Sorry, I did not understand the comment at all, and didn't spot how the test had changed. Still think it would be clearer to special-case |
Signed-off-by: Goutham Veeramachaneni <[email protected]>
61085c6
to
8de3184
Compare
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.
The fix LGTM. I left a couple of non-blocking comments.
Signed-off-by: Goutham Veeramachaneni <[email protected]>
[sorry, posted this in the wrong place yesterday] Wouldn't it look better if you add something like this at the top and don't change the loop?
|
But that would mean queries with the same start and end time created directly by users will never be cached. Might not be an issue though. |
I'm not seeing that. All I meant was to pull the special case out of the loop so we don't have to stare really hard at the loop to see what it means. |
Oh, you mean if we have a zero-length request and a non-zero-length cache entry (but still over 5 minutes) that covers it, then we won't look at that. Fair point. I think this helps to prove that this routine is too complicated to get right. |
…t#3818) * Handle the case of large step causing single pt extents We noticed that we were ignoring samples if the step is 24h and this fixes it. Signed-off-by: Goutham Veeramachaneni <[email protected]> * Handle the case of start == end better Signed-off-by: Goutham Veeramachaneni <[email protected]> * Address feedback Signed-off-by: Goutham Veeramachaneni <[email protected]> (cherry picked from commit e10ccda)
* Handle the case of large step causing single pt extents We noticed that we were ignoring samples if the step is 24h and this fixes it. Signed-off-by: Goutham Veeramachaneni <[email protected]> * Handle the case of start == end better Signed-off-by: Goutham Veeramachaneni <[email protected]> * Address feedback Signed-off-by: Goutham Veeramachaneni <[email protected]> (cherry picked from commit e10ccda) Co-authored-by: Goutham Veeramachaneni <[email protected]>
We noticed that we were ignoring samples if the step is 24h and this
fixes it.