{"push_id":750663976,"size":1,"distinct_size":1,"ref":"refs/heads/task-scheduler","head":"bf3cceb64c638ff719b06004a92e9cd2ebc070f9","before":"6df62347f53b86ec30181c70942d4cb40e3d0555","commits":[{"sha":"bf3cceb64c638ff719b06004a92e9cd2ebc070f9","author":{"email":"95fef802084407f2d182f5d234b7cba259bb9913@redhat.com","name":"John Sanda"},"message":"[HWKMETRICS-168] initial commit for new scheduler and task classes\n\n[HWKMETRICS-168] persist task to queue, update trigger api, and clean up tests\n\n[HWKMETRICS-168] add method/test for scheduling task and update schema\n\nPretty much all of the code prior to this ticket is commented out because it is\nbasically being rewritten. Tests will be added back though.\n\n[HWKMETRICS-168] big refactoring to get concurrency right.\n\nThe scheduler deals with 4 different thread pools - one for emitting ticks, one\nfor processing leases, one for executing tasks, and the C* driver's I/O\nthreads. Making sure things execute on the right thread pool turned out to be\na challenge when chaning various Rx operators together. It is not obvious like\nwhen you explicitly submit some task to a thread pool.\n\n[HWKMETRICS-168] handle exceptions thrown by tasks\n\n[HWKMETRICS-168] add support for setting number of executions in repeating trigger\n\nThis is generally useful feature, but I added it right now to help with\nintegration tests.\n\n[HWKMETRICS-168] adding group_key and exec_order columns to task_queue table\n\nThese columns help if/when tasks have interdependencies. All tasks having the\nsame group key will be stored in the same queue, which means that they will be\nassociated with the same lease. The exec_order column defines an execution\norder for tasks within the same group. Tasks with a lower number are executed\nfirst.\n\nThe commit also adds/updates TaskSchedulerTest to use RxJava's TestScheduler.\nIt took me a good bit of time over the weekend to understand how to set things\nup, but it was well worth the effort. Tests will be much more reliable,\nconsistent, and faster as they use a virtual clock.\n\n[HWKMETRICS-168] emit event when scheduler is done with time slice\n\nThe getAvailableLeases method now publishes the timestamp when all work is\ndone. This is basically a test hook so that we can make tests consistent and\nrepeatable.\n\n[HWKMETRICS-168] more tests\n\n[HWKMETRICS-168] get RatesITest passing again\n\n[HWKMETRICS-168] removing obsolete classes\n\n[HWKMETRICS-168] fix post merge errors and disable integration test\n\nThere were some changes need as a result of HWKMETRICS-114 which made the\ntenant id part of MetricId. The REST integration test for fetching counters is\ndisabled for now. Rates are calculated every minute (as of right now). We\ndo not want to have a test literally spin for several minutes waiting for rates\nto be generated. We need a way to use RxJava's TestScheduler for REST\nintegration tests. I am going to createa spearate ticket for this because I\nthink it will involve a bit of work.\n\n[HWKMETRICS-168] remove duplicate code in trigger classes and bump RxJava version\n\n[HWKMETRICS-168] add test to verify execution order and fix query\n\nI am adding a test that simulates a long running task. Every task is supposed\nexecute every minute. One of the tasks takes 3 minutes to complete. Tasks are\nsplit into two groups. The test verifies that tests are executed in the\nexpected order despite the long delay.\n\nThis commit also fixes a bug in the query to find available leases. The filter\nfunction needs to also check that the owern is not set in addition to the lease\nnot being finished.\n\nfix imports after rebase","distinct":true,"url":"https://api.github.com/repos/hawkular/hawkular-metrics/commits/bf3cceb64c638ff719b06004a92e9cd2ebc070f9"}]}