scylladb / scylla-ccm

Cassandra Cluster Manager, modified for Scylla
Apache License 2.0
20 stars 62 forks source link

ccmlib/scylla_node: add ks, cf params to wait_for_compactions() #532

Closed tchaikov closed 7 months ago

tchaikov commented 7 months ago

before this change, wait_for_compactions() waits until all pending compactions are finished. but sometimes, we just want to

  1. disable a certain $ks.$cf with column_family/autocompaction RESTful API, and
  2. wait until all pending compaction tasks of the specified $ks.$cf is done, then
  3. check the sstables of that table

column_family/autocompaction does not stop all compaction jobs a scylla instance, it just stops the specified table. so there are chances that we are still observing compaction tasks even if all the compactions of the specified table are stopped.

so, in this change, to cater the needs of the use case above, we add optional parameters to Node and ScyllaNode, so that we can specify the table we are interested in, instead of waiting for all tables.

also, instead of assigning n to pending_task before comparing them to detect the unexpected increasing number of pending tasks, we compare them before the assignment. otherwise, the branch is unreachable even if the pending_tasks is increasing.

Refs https://github.com/scylladb/scylladb/issues/16170

tchaikov commented 7 months ago

v2:

tchaikov commented 7 months ago

@scylladb/qa-maintainers hello maintainers, could you help queue this change?

fruch commented 7 months ago

@tchaikov, here this is a run for you:

if all of them are passing with this change, I'll merge.

tchaikov commented 7 months ago

@tchaikov, here this is a run for you:

the reason why enterprise tests are failing is that

are not included by enterprise yet.

if all of them are passing with this change, I'll merge.