monasca-persister/java/src/main/java/monasca/persister
Joseph Davis d66d78c338 Update all columns in metrics on an update to refresh TTL
Cassandra Time to Live (TTL) is applied per-column in a
row, and with a default TTL for the table.  The Cassandra
driver appears to have been written with a misunderstanding
that the TTL was per-row, and as a result the update
statements were written to avoid writing all cells.
But that results in some cells in the row not being updated,
and after their TTL expires they are removed, so a metric
query may result in partial data (updated_at set but
metric_id and created_at missing).

This fix changes the statement used when a new measurement
is received to use the same insert statement for the metric
row and thus refresh the TTL for all the columns.

A follow on patch should be created to remove the Update
statements for Measurements, and consider refactoring/removing
the caching model.

Change-Id: I6b7636a52e8bdb2ce8ad97f839acb6184cd58a8b
Story: 2005832
Task: 35872
2019-07-22 12:53:25 +00:00
..
configuration Java persister config: defaults and robustness 2018-01-10 17:31:19 +01:00
consumer Add Cassandra db support 2017-12-15 17:51:26 +00:00
dbi Add Influxdb 0.9.0 support 2015-02-09 13:01:56 -07:00
healthcheck Changes to get the java code to build on StackForge 2015-02-04 09:37:34 -07:00
pipeline Add Cassandra db support 2017-12-15 17:51:26 +00:00
repository Update all columns in metrics on an update to refresh TTL 2019-07-22 12:53:25 +00:00
resource Fix java file licenses 2015-07-26 22:14:47 -06:00
PersisterApplication.java Enhance fail fast on error functionality 2015-08-19 08:37:34 -06:00
PersisterModule.java Add Cassandra db support 2017-12-15 17:51:26 +00:00