During the tests of cql-stress with SCT, we noticed that there are some minor bugs in parsing logic, which result in runtime errors. Before this PR, there were two issues:
cql-stress converts all CLI arguments to lowercase. Even though c-s is case-insensitive in most of the cases, there are some arguments that cannot be converted to lowercase - them being replication and compaction strategies which. These strings are directly passed to CQL query, which is sent to Scylla. So, let's say that user specifies replication(strategy=SimpleStrategy). SimpleStrategy is then being converted to simplestrategy and sent in CQL query. This results in runtime DB error (unknown replication strategy/class).
minor issue with replication/compaction multiparameters and theirs subparameters. The issue is described in detail in the last commit. TLDR - some schema options could be specified twice in some cases, resulting in runtime DB error.
Changes
changed the logic so we apply lowercase conversion only in places where original c-s is case-insensitive, such as commands/options, some parameter values (e.g. distribution names)
fixed issue regarding replication and compaction multiparameters, where we would specify some schema options twice
Motivation
During the tests of cql-stress with SCT, we noticed that there are some minor bugs in parsing logic, which result in runtime errors. Before this PR, there were two issues:
replication(strategy=SimpleStrategy)
.SimpleStrategy
is then being converted tosimplestrategy
and sent in CQL query. This results in runtime DB error (unknown replication strategy/class).Changes
replication
andcompaction
multiparameters, where we would specify some schema options twice