4b7e7bf905
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