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

redis: use a Lua script to get measures #730

Merged
2 commits merged into from
Feb 9, 2018

Conversation

jd
Copy link
Member

@jd jd commented Feb 8, 2018

No description provided.

raise storage.AggregationDoesNotExist(
metric, aggregation, sampling)
if code == -2:
raise storage.MetricDoesNotExist(metric)
Copy link
Member

Choose a reason for hiding this comment

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

i don't think we have tests for this as i deleted the following and it still passes.

+        if code == -1:
+            sampling = utils.to_timespan(result.split(self.FIELD_SEP_B)[2])
+            raise storage.AggregationDoesNotExist(
+                metric, aggregation, sampling)
+        if code == -2:
+            raise storage.MetricDoesNotExist(metric)

tbh, i'm not sure it's possible to get this far as we do validate the aggregation beforehand.

Copy link
Member Author

Choose a reason for hiding this comment

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

I just kept the same structure, so IIUC, this is not a new problem (if it is one at all)?

Copy link
Member

Choose a reason for hiding this comment

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

well it's a problem in that the errors raise are never validated so in theory, you could've broken it :P

Copy link
Member

@chungg chungg left a comment

Choose a reason for hiding this comment

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

create a bug or something?

@jd
Copy link
Member Author

jd commented Feb 9, 2018

@chungg fair enough #732

@ghost ghost merged commit f30eea9 into gnocchixyz:master Feb 9, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants