Branch: refs/heads/no_midx
Home:
https://github.com/hawkular/hawkular-metrics
Commit: 7d2ef520926ecbee43d3788a4155e3913097a83b
https://github.com/hawkular/hawkular-metrics/commit/7d2ef520926ecbee43d37...
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: 2016-08-19 (Fri, 19 Aug 2016)
Changed paths:
M
core/metrics-core-service/src/main/java/org/hawkular/metrics/core/service/DataAccess.java
M
core/metrics-core-service/src/main/java/org/hawkular/metrics/core/service/DataAccessImpl.java
M
core/metrics-core-service/src/main/java/org/hawkular/metrics/core/service/MetricsServiceImpl.java
A
core/metrics-core-service/src/main/java/org/hawkular/metrics/core/service/transformers/MetricFromDataRowTransformer.java
A
core/metrics-core-service/src/main/java/org/hawkular/metrics/core/service/transformers/MetricFromFullDataRowTransformer.java
M
core/metrics-core-service/src/test/java/org/hawkular/metrics/core/service/DelegatingDataAccess.java
M
core/metrics-core-service/src/test/java/org/hawkular/metrics/core/service/metrics/AvailabilityITest.java
M
core/metrics-core-service/src/test/java/org/hawkular/metrics/core/service/metrics/BaseMetricsITest.java
M
core/metrics-core-service/src/test/java/org/hawkular/metrics/core/service/metrics/GaugeITest.java
Log Message:
-----------
[HWKMETRICS-422] Avoid writing to the metrics index on data point inserts. However, keep
all the other writes to the metrics index in place.
Here are the changes to query metrics:
1) When requesting info about a single metric
a) query the metrics index first, if found then return the info (just like before this
change)
b) if no result there, query the data table for a single data point, if found then the
metric exists just not in the metrics index
c) if no result in either metrics index or data table then there is no such metric
2) When requesting a list of all metrics for a tenant
a) query the metrics index first
b) query the data table for all metrics and filter by tenant and type if needed
c) concat the two lists
d) return only distinct values; note that the results from metrics index take
precendence since they contain info about data retention and tags.
Note: After this change the metrics index will still contain metrics that have tags,
non-default retention values, or have been explicitly created by the user. Metrics that
just have data points will not have an entry in the metrics index table.