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.

(cherry picked from commit 5c990b2)
Signed-off-by: Stefan Negrea <snegrea@redhat.com>
(cherry picked from commit 378902d)
Signed-off-by: Stefan Negrea <snegrea@redhat.com>

# Conflicts:
#	core/metrics-core-service/src/main/java/org/hawkular/metrics/core/service/MetricsServiceImpl.java
  • Loading branch information
Stefan Negrea committed Sep 25, 2017
1 parent 59d0506 commit 8308d2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ public Observable<Void> addTags(Metric<?> metric, Map<String, String> tags) {
return Observable.error(e);
}

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 8308d2c

Please sign in to comment.