influxdata / influxdata/influxdb

Using last() shows the current time minus whatever the time range is set to

Open
#21,313 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
31.7k
Forks
3.7k
Avg merge
13h 37m
Merged PRs (30d)
8

Description

InfluxDB version 1.8.5

Using a query with `last(*)` makes the Time column show the current time minus whatever the time range is set to.

Running the following query:
```
SELECT last(*) FROM "minioConnectivity" WHERE $timeFilter GROUP BY "minioConnectivity-key"
```

Shows the following:
![image](https://user-images.githubusercontent.com/17955210/116351907-d23a2800-a80d-11eb-801f-435962d57b82.png)

Which is the current time - 30 mins (my current time range). If I keep refreshing the page it will keep updating alongside the current time. If I change my time range it updates to current time minus that value, i.e its not actually showing the value inside the DB

If I remove the call to `last()` I get the correct time which is stored in the DB.
![image](https://user-images.githubusercontent.com/17955210/116352168-2fce7480-a80e-11eb-9eca-00700051ed57.png)

Any ideas why this is happening?

EDIT: Remove the time filter makes it show epoch-time=0. So it must be related to https://github.com/influxdata/docs.influxdata.com-ARCHIVE/issues/2153

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the behavior in InfluxDB 1.8.5 with the shown last(*) query, both with and without $timeFilter, and compare the displayed time with the stored value. Read the linked archived issue about the time filter; done means last(*) reports the database timestamp rather than a value derived from the selected range.

Written by the indexing model from the issue text.

Assessment

Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.