Currently, the common logic for operations is repeated. The idea is to introduce an additional struct that will handle the common logic and encapsulate the logic of specific c-s operation.
Introduced a CassandraStressOperation trait which represents a specific c-s operation.
The GenericCassandraStressOperation structure will handle the common logic and delegate
the specific operation logic to some object implementing CassandraStressOperation.
The common logic that was extracted to GenericCassandraStressOperation:
checks whether operation_id > max_operations. If true, the stress test will be terminated
Fixes: https://github.com/scylladb/cql-stress/issues/67
Motivation
Currently, the common logic for operations is repeated. The idea is to introduce an additional struct that will handle the common logic and encapsulate the logic of specific c-s operation.
This will also help to implement
mixed
operation. This is why, we should merge it before https://github.com/scylladb/cql-stress/pull/63.Solution
Introduced a
CassandraStressOperation
trait which represents a specific c-s operation. TheGenericCassandraStressOperation
structure will handle the common logic and delegate the specific operation logic to some object implementingCassandraStressOperation
.The common logic that was extracted to
GenericCassandraStressOperation
:operation_id
>max_operations
. If true, the stress test will be terminated