Branch: refs/heads/release/0.28.0
Home:
https://github.com/hawkular/hawkular-metrics
Commit: 0d0fe23626704d845d14e0f3b4ab1fbe6e219cbe
https://github.com/hawkular/hawkular-metrics/commit/0d0fe23626704d845d14e...
Author: John Sanda <jsanda(a)redhat.com>
Date: 2018-04-23 (Mon, 23 Apr 2018)
Changed paths:
M
api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/MetricsServiceLifecycle.java
M
core/metrics-core-service/src/main/java/org/hawkular/metrics/core/jobs/JobsServiceImpl.java
A
core/metrics-core-service/src/main/java/org/hawkular/metrics/core/service/TempTablesCleaner.java
R job-scheduler/src/main/java/org/hawkular/metrics/scheduler/api/RetryPolicy.java
M job-scheduler/src/main/java/org/hawkular/metrics/scheduler/api/Scheduler.java
M job-scheduler/src/main/java/org/hawkular/metrics/scheduler/impl/SchedulerImpl.java
M job-scheduler/src/main/java/org/hawkular/metrics/scheduler/impl/TestScheduler.java
M
job-scheduler/src/test/java/org/hawkular/metrics/scheduler/impl/JobExecutionTest.java
Log Message:
-----------
[HWKMETRICS-780] fix temp tables not getting dropped (#928)
* [HWKMETRICS-763] fix bug in scheduler error handling
I found the bug today which is in SchedulerImpl.java. At some point a while back
I added retry support for when jobs fails. You provide a RetryPolicy that
determines if and when a job should be retried. This was primarily intended for
non-repeating, single-execution jobs. For repeating jobs, i.e., the compression
job, the job is supposed to be executed according to its trigger. Suppose the
compression job is scheduled to run at 15:00 and repeats every two hours. If
the 15:00 execution fails, the scheduler is supposed to retry the job (for all
intensive purposes) immediately with the same trigger time of 15:00. When the
job completes normally, its trigger will get updated in the database to the
next execution time of 17:00. If it already later than 17:00, then the
scheduler will again execute the job right away.
There was a bug with the error handling such that the job wasn't getting
retried for the 15:00 execution. The trigger was getting advanced and set to
17:00. The temp table being compressed gets dropped at the end of the
compression job. Unless the failure was dropping the table, we end up with
orphaned temp tables any time the job fails.
This commit does away with the RetryPolicy since it is not used. This
means that when a job fails, regardless of whether or not it is
repeating, it will be retried with the same trigger until it completes
normally.
* [HWKMETRICS-763] add "local" job to check for expired temp tables
Due to the bug in SchedulerImpl.java which was fixed in my previous
commit, there are openshift clusters with literally hundreds of expired
temp tables. They are expired in the sense that they are older than the
data retention and therefore do not contain any live data.
This commit adds a "local" job that checks for and drops expired tables.
The job is local in the sense that it is local to the hawkular-metrics
server. It is not run via the job scheduler.
* [HWKMETRICS-763] use Observable.empty to get rid of filter call
Commit: 7afe1aea1c1b046e4e5dafa5c015491a6968025f
https://github.com/hawkular/hawkular-metrics/commit/7afe1aea1c1b046e4e5da...
Author: John Sanda <jsanda(a)redhat.com>
Date: 2018-04-23 (Mon, 23 Apr 2018)
Changed paths:
M
api/metrics-api-jaxrs/src/main/java/org/hawkular/metrics/api/jaxrs/MetricsServiceLifecycle.java
M
core/metrics-core-service/src/main/java/org/hawkular/metrics/core/jobs/JobsServiceImpl.java
A
core/metrics-core-service/src/main/java/org/hawkular/metrics/core/service/TempTablesCleaner.java
R job-scheduler/src/main/java/org/hawkular/metrics/scheduler/api/RetryPolicy.java
M job-scheduler/src/main/java/org/hawkular/metrics/scheduler/api/Scheduler.java
M job-scheduler/src/main/java/org/hawkular/metrics/scheduler/impl/SchedulerImpl.java
M job-scheduler/src/main/java/org/hawkular/metrics/scheduler/impl/TestScheduler.java
M
job-scheduler/src/test/java/org/hawkular/metrics/scheduler/impl/JobExecutionTest.java
Log Message:
-----------
Merge pull request #955 from jsanda/hwkmetrics-786
HWKMETRICS-786
Compare:
https://github.com/hawkular/hawkular-metrics/compare/a92b2b12dd38...7afe1...