Commit Graph

68 Commits (cde064b41b16eb24eeef1e2a69ca2c770eb6061f)

Author SHA1 Message Date
Alirie Gray 364e80bc94
fix(tasks): use go errors for scheduler metrics (#15374) 2019-10-10 09:55:30 -07:00
Alirie Gray aef199bcc1
fix(tasks): use influxdb errors in scheduler (#15145) 2019-09-16 13:55:39 -07:00
Alirie Gray 067305c148
feat(tasks): add WithMaxConcurrency to configure scheduler (#15121) 2019-09-12 11:47:27 -07:00
Lyon Hill 243e946697
fix(task): execution metric now shows correct data (#15112)
The first pass failed to save the correct execution metrics,
it will now compare the difference between start and finish.
2019-09-11 13:22:22 -06:00
Alirie Gray 21e14de7aa
feat(tasks): use env variable for concurrency (#15110) 2019-09-10 16:05:50 -07:00
Lyon Hill cc84a43cea
feat(task): add run duration to task metrics (#15102)
We need to be able to see how long its taking task's to run as well
be able to see the start delta time per task.
2019-09-10 12:30:17 -06:00
docmerlin (j. Emrys Landivar) 03215c0028 chore(tasks): up concurrency to 11, this is a temporary workaround till we get a new scheduler 2019-09-09 17:13:14 -05:00
Lyon Hill 2b75d20570
fix(task): Update task in scheduler to show updated logs. (#15008)
The current behavior is that the update is pushed into the scheduler,
and the scheduler cherry pick's what it needs. This leaves the task itself out
meaning any logging the scheduler did was not going to have the new task information in it.
2019-09-06 10:38:56 -06:00
Sebastian Borza 95b834ca2a
push task backend logging messages back to debug 2019-07-25 17:17:19 -05:00
Sebastian Borza 0653043353
move logger facility back to Info from Debug 2019-07-23 07:35:57 -05:00
Lyon Hill 10bfc91562
fix(task): fix an issue where tasks fail to resume on claim (#14356) 2019-07-16 14:10:28 -06:00
Alirie Gray c7f09d6a56
chore(tasks): use pointers for task errors (#14343) 2019-07-15 13:57:51 -07:00
Lyon Hill 1cd3705576
fix(task): force the scheduler to use the correct success when updating metrics (#14313) 2019-07-11 13:44:21 -06:00
Lyon Hill 83d9b8e89b
feat(task): Add traceID to new run's (#14150) 2019-06-18 11:29:25 -06:00
Alirie Gray 66157c9d44 chore(tasks): consolidate task errors into task_errors.go 2019-06-17 16:03:18 -07:00
Lyon Hill ab79b68840
fix(task): Remove older unused task store code. (#14068)
* fix(task): Remove older unused task store code.
2019-06-06 10:05:27 -06:00
Lyon Hill 27fd7ece2d
fix(tasks): move debug task logs to debug (#14053) 2019-06-03 14:11:11 -06:00
Lyon Hill 6c11be0304
fix(task): Remove timeout on task run updates (#13965)
Now that the run status updates are transactional actions
We no longer have to add a timer to keep things on track.

This is causing a problem where some runs are showing up without a start or stop time if the system is busy.
I would rather have the scheduler hang on the update then leave a run action without required fields.
2019-05-20 09:47:20 -06:00
Lyon Hill 69b26c3df6
fix(task): fix metrics for tasks currently running tasks (#13832) 2019-05-07 13:42:49 -06:00
Lyon Hill e4b69914c9
feat(task): Track queue duration (#13805)
* feat(task): Track queue duration
Track the time it takes for a task to go from it's dueAt time until it actually starts
2019-05-07 10:03:30 -06:00
Lyon Hill 166e50f594
Fix inactive task scheduling (#13721) 2019-04-30 16:30:02 -06:00
Lyon Hill 8fa86488c3
Newly activated tasks should not attempt to 'catch up' (#13700)
* Newly activated tasks should not attempt to 'catch up'
2019-04-29 15:28:34 -06:00
Lyon Hill 5b8c4ea0e8
fix task limit in kv and add tests Also fix a minor race condition in task scheduler (#13538)
* fix task limit in kv and add tests Also fix a minor race condition in task scheduler

* update comment
2019-04-22 13:09:19 -06:00
Jacob Marble f56c42794b
chore(tracing): Cleanup (#13296)
* chore(tracing): Cleanup

* broken test

* fix unused var

* fix test
2019-04-10 19:28:21 -07:00
Lyon Hill c78344c441
update task schedler to use the new task control service (#12949) 2019-03-28 16:52:25 -06:00
Lyon Hill 49d025ba64
add mutex around modifying runner count (#12778) 2019-03-20 10:40:13 -06:00
Lyon Hill 2ae969b31d
fix(task): Fix flakey tests introduced by slower task updates (#12753)
Task updates now attempt to keep the existing runners working.
This causes the system to be slightly slower after a task update and caused a flakey test.
2019-03-20 09:39:44 -06:00
Mark Rushakoff 50b5b25f71 feat(task): include run errors in task log
This should considerably simplify debugging when things go wrong with
the tasks, as this error can be displayed from the UI or CLI. Prior to
this change, you would have to view the console output from influxd.

Fixes #12548.
2019-03-15 08:12:39 -07:00
Lyon Hill fca6a9c412
Ensure when a manual run is called we run it as soon as possible (#12593)
* Ensure when a manual run is called we run it as soon as possible
2019-03-14 10:25:45 -06:00
Jacob Marble 603a1f26e0 use tracing.StartSpanFromContext 2019-03-07 12:12:31 -07:00
Jacob Marble 9541e861a3 goimports -w -local github.com/influxdata/influxdb 2019-03-07 12:12:31 -07:00
Jacob Marble 92fa813c45 add spans to multiple services 2019-03-07 12:12:31 -07:00
Jonathan A. Sternberg 78430df2bb
refactor(task/backend): replace a removed interface with the method name (#12203) 2019-02-26 14:20:37 -06:00
Lyon Hill 049e8f8c90
Add stats to the run log (#12157) 2019-02-26 08:53:36 -07:00
Mark Rushakoff 12292a4983 fix(task): recover when call to execute fails
This was a missed case from #11817.

This case currently occurs when creating a task through the UI, using a
session rather than a full-fledged authorization. It doesn't fix that
case yet, but at least it will log an informative message.
2019-02-15 08:32:04 -08:00
Mark Rushakoff 3a9b3a521a fix(task): clean up run state after a run fails
Previously the DesiredState would not be cleared after an individual run
failed.

Fixes #11816.
2019-02-12 10:53:37 -08:00
Mark Rushakoff 211d28567d fix(task): set run status to failed if execution fails
Previously a run that started successfully and then failed, would be
incorrectly marked as a success.
2019-02-04 15:51:11 -08:00
Mark Rushakoff d73d73c0d4 chore: rename imports from platform to influxdb
I did this with a dumb editor macro, so some comments changed too.

Also rename root package from platform to influxdb.

In interest of minimizing risk, anyone importing the root package has
now aliased it to "platform" so that no changes beyond imports were
necessary in those files.

Lastly, replace the old platform module to local path /dev/null so that
nobody can accidentally reintroduce a platform dependency while
migrating platform code to influxdb.
2019-01-09 20:51:47 -08:00
Mark Rushakoff 2e81dd31b4 refactor(task): enable high-frequency WithTicker option
Previously, the WithTicker option would call TickScheduler.Tick every
time the underlying time.Ticker sent a time on its channel. This meant
we used a 1s period, which meant that in the worst case, we would see a
tick at about 999ms after the second rollover.

This change increases the underlying time.Ticker frequency, but only
calls TickScheduler.Tick after a second rolls over. Since we now use a
tick frequency of 100ms, during normal operation, TickScheduler.Tick
will be called within 0.1s after the second rolls over.
2018-12-07 08:38:59 -08:00
Mark Rushakoff ed15dd2305 refactor(task): add Executor.Wait method
This is to ensure that Scheduler.Stop blocks until outstanding task runs
finish. There were enterprise tests failing because outstanding runs of
a task were calling (*testing.T).Log after the test finished.
2018-11-21 14:27:56 -08:00
docmerlin (j. Emrys Landivar) 8f8c56ea8d opentracing 2018-11-12 16:34:06 -06:00
Mark Rushakoff 39e115cebe fix(task): fix closure mistake when reclaiming tasks
Also improve some the coordinator tests a little bit and improve the
executor logging while we're here.
2018-10-31 19:00:02 -07:00
docmerlin (j. Emrys Landivar) 6e2620418c Now you can cancel runs 2018-10-29 16:08:50 -05:00
Mark Rushakoff 8442acd437 refactor(task): emit "ticked" log messages at debug level
The ticked message every second is more annoying than helpful as-is.
Drop it to debug level so it's available if needed.
2018-10-25 11:23:28 -07:00
Mark Rushakoff 8c0aec7975 fix(task): propagate status updates when modifying tasks
This also changes the backend.Store API to remove the EnableTask and
DisableTask methods, merging their functionality into ModifyTask, which
has been named to UpdateTask to keep closer to the CRUD acronym.
2018-10-19 16:49:18 -07:00
Lyon Hill e643c434f6
Allow the scheduler to Update tasks. (#1058)
* Allow the scheduler to Update tasks.

* update the coordinator to use the new update action

* remove unclean code
2018-10-12 08:24:22 -06:00
Leonardo Di Donato 9104771408 fix(task/backend): porting to uint64 IDs
Co-Authored-By: Lorenzo Fontana <lo@linux.com>
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
2018-10-11 09:54:18 -05:00
Lyon Hill 610faf18e7
Update the scheduler to add a few task logs (#1029) 2018-10-10 12:37:11 -06:00
docmerlin (j. Emrys Landivar) 25e965d7ae scheduler->TickScheduler 2018-10-01 14:59:02 -05:00
docmerlin (j. Emrys Landivar) 4502b4a47f add requestedAt to task log 2018-09-27 12:46:57 -05:00