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

influx v1 shell returns wrong timestamps #555

Open
tom-ch1 opened this issue Jan 1, 2025 · 0 comments
Open

influx v1 shell returns wrong timestamps #555

tom-ch1 opened this issue Jan 1, 2025 · 0 comments

Comments

@tom-ch1
Copy link

tom-ch1 commented Jan 1, 2025

When querying data in the v1 shell the timestanps are wrong:

environment

  • OS: Debian: GNU/Linux 12 (bookworm)
  • influx version: Influx CLI dev (git: a79a2a1) build_date: 2024-04-16T14:34:32Z
  • retention periods for the bucket in question:
SHOW RETENTION POLICIES ON my_db
name,tags,name,duration,shardGroupDuration,replicaN,default
,,autogen,0s,168h0m0s,replicaN,true

steps to reproduce

  1. influx v1 shell
  2. use "my_db"
  3. precision ns
  4. SELECT time,temp FROM "heating" WHERE temp=0

expected result

the returned timestamps should be correct and in nanosecond precision

actual result

the returned timestamps are incorrect
example:

  • timestamp for first entry is: "1735325299900396800.0000000000"
  • however, it should be: "1735325299900396750"

proof that timestamps are incorrect

  • if I query the database using the REST API, I get the correct timestamp:
curl --get 'http://my_server:8086/query' --header 'Authorization: Token <my token>' --header 'Accept: application/csv' --header 'Content-type: application/json' --data-urlencode 'orgID=m<_org' --data-urlencode 'db=my_db' --data-urlencode 'epoch=ns' --data-urlencode 'q=SELECT time,temp FROM heating WHERE temp = 0'

the corresponding entry is: heating,,1735325299900396750,0

  • if I now try to delete the entry using influx v1 shell according to the timestamp, the entry gets deleted only if I indicate the correct timestamp:
    • DELETE FROM "heating" WHERE time = 1735325299900396800 --> entry is not deleted
    • DELETE FROM "heating" WHERE time = 1735325299900396750 --> entry is deleted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant