Inserting now as timestamp in Riak

90 Views Asked by At

Usually I don't trust clients time when inserting time series data.

Is it possible to tell Riak to insert a record using server side current time? Something like now() function in InfluxDB: https://docs.influxdata.com/influxdb/v1.1/concepts/glossary/#now

INSERT INTO Results VALUES ('MyResult, now()); ???

1

There are 1 best solutions below

0
On BEST ANSWER

Riak TS does not currently include the equivalent of a Now() function. It is possible that an equivalent function will be added in the future however implementation of a server side Now() type function has challenges related to the distributed nature of Riak TS and synchronization of time across a cluster of servers. As a rule using client generated time stamps in your application will limit the potential for conflicts (events being written out of order).