Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Timestamp fixes etc #919

Merged
merged 10 commits into from
May 20, 2018
Merged

Timestamp fixes etc #919

merged 10 commits into from
May 20, 2018

Conversation

Dieterbe
Copy link
Contributor

trying to create new PR because circleCI keeps saying a test failed but i don't see how/why

it happened to work because the only caller used an end that divides by
the step. But now it works in all cases
AggMetric, Store, and Cache all support retrieving a range of data.
ranges are defined as from to to; where from is inclusive and to is
exclusive. thus valid ranges must have from < to; with the special
case of from = to - 1, which selects exactly 1 1-second slot.

in particular:

* use uniform error messages across all 3
* AggMetric.Get(): when hitting unexpected nil chunk, return error.
  if we have corruption in our in-memory chunklist, i rather return
  an error to client rather than trying to query the store to prevent
  cascading trouble. Seems pretty rare considering chunkcache does
  most of the work, but the other reason is now that we return errors
  instead of panicing, this seems cleaner
* in cache.Search treat from > to as an error
if interval is, say 120s
then you can expect points with these timestamps:
120
240
360
...

previously, if you issued a render request such as to=300,until=330
on a raw archive (which still needs quantizing so we do some tricks)
those tricks would result in bad request errors.
Now we handle them as they should: return [].

fix #912
@Dieterbe Dieterbe force-pushed the timestamp-fixes-etc-wtf-circleci branch 4 times, most recently from 4bf5018 to 0b2b286 Compare May 20, 2018 21:29
@Dieterbe Dieterbe force-pushed the timestamp-fixes-etc-wtf-circleci branch from 0b2b286 to 3823c2b Compare May 20, 2018 21:33
@Dieterbe
Copy link
Contributor Author

this replaces #915 and #916

@Dieterbe Dieterbe merged commit 43927d2 into master May 20, 2018
@Dieterbe Dieterbe deleted the timestamp-fixes-etc-wtf-circleci branch September 18, 2018 09:08
@Dieterbe Dieterbe added this to the 0.10.0 milestone Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant