Skip to content

Commit

Permalink
[HWKMETRICS-721] Update the order of metric updates to ensure the met…
Browse files Browse the repository at this point in the history
…rics is persisted on the metrics index prior to updating the tags. This will resolve corner cases where an update fails and the tags of a metric are persisted without the metric definition properly persisted.
  • Loading branch information
Stefan Negrea committed Sep 12, 2017
1 parent fa2e8e0 commit 1745b4a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ public Observable<Void> addTags(Metric<?> metric, Map<String, String> tags) {

this.updateMetricExpiration(metric.getMetricId());

return dataAccess.addTags(metric, tags).mergeWith(dataAccess.insertIntoMetricsTagsIndex(metric, tags))
return dataAccess.insertIntoMetricsTagsIndex(metric, tags).concatWith(dataAccess.addTags(metric, tags))
.toList().map(l -> null);
}

Expand Down

0 comments on commit 1745b4a

Please sign in to comment.