OpenTSDB / opentsdb

A scalable, distributed Time Series Database.
http://opentsdb.net
GNU Lesser General Public License v2.1
5k stars 1.25k forks source link

Opentsdb does not accept 0 as a valid timestamp #822

Open Raghu-Gurrala opened 8 years ago

Raghu-Gurrala commented 8 years ago

I'm trying to insert 0 as a time-stamp value but it returns error Invalid Timestamp.

johann8384 commented 8 years ago

Ok, I'm having trouble reproducing this. Which version are you working against?

Raghu-Gurrala commented 8 years ago

I’m using version 2.2.0

Thanks Raghu

From: Jonathan Creasy [mailto:notifications@github.com] Sent: Thursday, June 30, 2016 12:03 AM To: OpenTSDB/opentsdb opentsdb@noreply.github.com Cc: Gurrala, Raghu raghu.gurrala@joyglobal.com; Author author@noreply.github.com Subject: Re: [OpenTSDB/opentsdb] Opentsdb does not accept 0 as a valid timestamp (#822)

Ok, I'm having trouble reproducing this. Which version are you working against?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/OpenTSDB/opentsdb/issues/822#issuecomment-229559962, or mute the threadhttps://github.com/notifications/unsubscribe/ATRVbjm14E3Mwl2PBmctykJI3I8n3eLHks5qQ03ygaJpZM4JBHOL.

This electronic mail transmission contains information from Joy Global Inc. which is confidential, and is intended only for the use of the proper Addressee. If you are not the intended recipient, please notify us immediately at the return address on this transmission, and delete this message and any attachments from your system. Unauthorized use, copying, disclosing, distributing, or taking any action in reliance on the contents of this transmission is strictly prohibited and may be unlawful. Privacy-JGI

johann8384 commented 8 years ago

$ echo "put metric.test 0 0 tag=value" | nc localhost 4242 put: illegal argument: invalid timestamp: 0

johann8384 commented 8 years ago

The change to make a timestamp of 0 work will require a lot of retooling both on the insert and the query side. Mostly for the query side. A timestamp of 0 is easily equated with FALSE in a few cases. Out of curiosity, what use case do you need to use the timestamp Thu, 01 Jan 1970 00:00:00 GMT

Raghu-Gurrala commented 8 years ago

Hi Jonathan,

Apologies for late reply, There is no specific use case, I was testing out throughput using false data and purposely changed the timestamp to 0.

Thanks, Raghu