Skip to content

Commit

Permalink
[HWKMETRICS-721] Revert a change to previous cleaner implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Negrea committed Sep 12, 2017
1 parent 2f2b66e commit 1ef6dd3
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1097,12 +1097,8 @@ public <T> Observable<Void> deleteMetric(MetricId<T> id) {
Observable<Void> result = dataAccess.getMetricTags(id)
.map(row -> row.getMap(0, String.class, String.class))
.defaultIfEmpty(new HashMap<>())
.flatMap(map -> {
if (map.isEmpty()) {
return Observable.empty();
}
return dataAccess.deleteFromMetricsTagsIndex(id, map).map(r -> null);
});
.flatMap(map -> dataAccess.deleteFromMetricsTagsIndex(id, map))
.map(r -> null);
result = result.mergeWith(dataAccess.deleteMetricFromMetricsIndex(id).map(r -> null))
.mergeWith(dataAccess.deleteMetricData(id).map(r -> null))
.mergeWith(dataAccess.deleteMetricFromRetentionIndex(id).map(r -> null))
Expand Down

0 comments on commit 1ef6dd3

Please sign in to comment.