Commit Graph

10 Commits

Author SHA1 Message Date
Aleksandra Martyniuk
607be221b8 tasks: unregister tasks with parents when they are finished
Unregister children that are finished from task manager. They can be
examined through they parents.

(cherry picked from commit a82a2f0624)
2024-06-04 14:42:09 +00:00
Benny Halevy
51a46aa83b compaction_manager: perform_task_on_all_files: return early when there are no sstables to compact
Prevent the creation of a compaction task when
the list of sstables is known to be empty ahead
of time.

Refs scylladb/scylladb#16694
Fixes scylladb/scylladb#16803

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2024-01-17 11:53:39 +02:00
Botond Dénes
fa4aec90e9 Merge 'test: tasks: Fix task_manager/wait_task test ' from Aleksandra Martyniuk
Rewrite test that checks whether task_manager/wait_task works properly.
The old version didn't work. Delete functions used in old version.

Closes #14959

* github.com:scylladb/scylladb:
  test: rewrite wait_task test
  test: move ThreadWrapper to rest_util.py
2023-08-07 09:04:29 +03:00
Aleksandra Martyniuk
629f893355 test: rewrite wait_task test
Rewrite test that checks whether task_manager/wait_task works properly.
The old version didn't work. Delete functions used in old version.
2023-08-04 13:34:58 +02:00
Aleksandra Martyniuk
bfa3a7325a test: extend test_compaction_task.py to cover compaction group tasks 2023-07-28 10:51:55 +02:00
Aleksandra Martyniuk
241b56b7b5 test: drain old compaction tasks from task manager
When running compaction task test on the same scylla instantion
other tests are run, some compaction tasks from other test cases may
be left in task manager. If they stay in memory long enough, they may
get unregistered during the compaction task test and cause bad_request
status.

Drain old compaction tasks before and after each test.

Fixes: #14584.

Closes #14585
2023-07-17 10:57:36 +03:00
Aleksandra Martyniuk
be3317623f api: throw bad_param_exception when requested task/module does not exists
In task manager and task manager test rest apis when a task or module
which does not exist is requested, we get Internal Server Error.

In such cases, wrap thrown exceptions in bad_param_exception
to respond with Bad Request code.

Modify test accordingly.
2023-06-07 11:58:28 +02:00
Aleksandra Martyniuk
b325bf11bc test: extend compaction tasks test
Compaction task test checks whether child-parent relationship
in tasks tree is valid.
2023-05-31 14:59:24 +02:00
Aleksandra Martyniuk
24edcd27d4 test: extend major keyspace compaction tasks test 2023-03-01 18:56:31 +01:00
Aleksandra Martyniuk
02931163ef test: add task_manager_utils.py
Task manager api will be used in many tests. Thus, to make it easier
api calls to task manager are wrapped into functions in task_manager_utils.py.
Some helpers that may be reused in other tests are moved there too.
2023-02-14 13:34:04 +01:00