Ricardo Mayerhofer
Ricardo Mayerhofer

Reputation: 2309

Inserting now as timestamp in Riak

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()); ???

Upvotes: 0

Views: 87

Answers (1)

Craig
Craig

Reputation: 1001

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).

Upvotes: 2

Related Questions