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

Inconsistent and incorrect results when specifying only lower bound of time range #2120

Closed
jnutzmann opened this issue Mar 30, 2015 · 4 comments
Milestone

Comments

@jnutzmann
Copy link

I am getting inconsistent results queries where the max time (and therefore interval) is changing.

For example this query:

SELECT count(value) FROM my_series WHERE time > '2015-03-30T05:00:00Z'

produces these different values depending on the time it is run:

                    "values": [
                        [
                            "2015-03-30T02:54:07.643069964Z",
                            492
                        ]

or

                    "values": [
                        [
                            "2015-03-29T22:15:17.48468256Z",
                            0
                        ]
                    ]

or

                    "values": [
                        [
                            "2015-03-30T04:49:13.157470596Z",
                            554
                        ]
                    ]

I can also manually specify the max time in the query and get the results to change based on that time. Consistent, but not necessarily correct, results are obtained by running a query with both the min and max time specified in the query (not using now(...)).

My guess is something is still incorrect in how the buckets are being calculated if there is only one bucket. Also, the time in the query result seems to imply that the interval start normalization is occurring when it shouldn't be.

@jnutzmann jnutzmann changed the title Inconsistent results when specifying time range Inconsistent and incorrect results when specifying only lower bound of time range Mar 30, 2015
@dashesy
Copy link

dashesy commented Mar 30, 2015

@jnutzmann looking at the docs here the time format string should be YYYY-MM-DD HH:MM:SS.mmm, it is not a iso format like when pushing data. If iso format is accepted perhaps docs should be updated.

@jnutzmann
Copy link
Author

Looks like iso format is accepted. Also, Unix timestams seems to be as well (with and without "s" on the end).

That said, the problem still exists no matter how you specify the time.

@gillesdemey
Copy link

I'm seeing the exact same behavior in rc17, aggregate functions like count, mean and percentile are also affected in my test.

I'm using relative time notation SELECT count(ms) FROM latency WHERE time > now() - 5m

It'll report 0 most of the time (I just generated some results using ab within the 5 minute time frame however) but rarely it'll report the correct value.

EDIT:

It also occurs when specifying the upper bound:
SELECT count(ms) FROM latency WHERE time > now() - 5m AND time < now()

@jnutzmann
Copy link
Author

Update: With the current master this has been half fixed. The count(value) that it reports is consistent, but the timestamp that comes with it still varies depending on the system time when the query is run.

@toddboom toddboom modified the milestones: 0.9.0, 0.9.1 May 8, 2015
@toddboom toddboom modified the milestones: 0.9.1, 0.9.2 Jun 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants