-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
c-s: create correct tables based on workload #86
Conversation
cbadf27
to
7759463
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For substantially better review experience (clear diff between old and new logic), please extract another commit that makes the create_schema
function a method (without any changes to its logic) (pure refactor commit), and then proceed with the commit that changes logic only.
v2: addressed review comment |
@muzarski the defined behavior is incorrect. |
let (create_standard_table, create_counter_table) = match (&self.mixed, &self.counter) { | ||
(None, None) => (true, false), | ||
(None, Some(_)) => (false, true), | ||
(Some(_), _) => (true, true), | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is incorrect definition
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to change mixed behavior
This means that |
The 50/50 reads/writes is the default behaviour, but can be configured via |
ping @roydahan - I'd like to make sure we are on the same page so I can merge this. |
Ok, I understand now. |
@muzarski rethinking of it, AFAIR in c-s we don't create the tables in "mixed" command, it assumes that one already ran a "write" command before that in order to prepare for it. |
still question about creating the table for mixed command
Oh, that's interesting. But it would make sense, since |
List of tables created for each command: - write -> `keyspace1.standard1` table - counter_write -> `keyspace1.counter1` table - user -> keyspace and table provided in user profile yaml file - read/counter_read/mixed -> no table created
v3:
@roydahan Please confirm that it makes sense now. |
Updating cql-stress to latest version. This version contains the fix for scylladb/cql-stress#86
Updating cql-stress to latest version. This version contains the fix for scylladb/cql-stress#86
now we don't create the schema... but the code still tries to prepare statements on the non-existing keyspace/table..., which is even worse, mixed can't be use now...
|
I can reverse the changes regarding mixed workload so it creates the schema. |
Looking at the code of original c-s: public void maybeCreateKeyspaces()
{
if (command.type == Command.WRITE || command.type == Command.COUNTER_WRITE)
schema.createKeySpaces(this);
else if (command.type == Command.USER)
((SettingsCommandUser) command).profile.maybeCreateSchema(this);
} Keyspace and tables are not created for mixed workloads. @fruch Please try to run the |
We did run the write workload before, but the mixed workload shouldn't do any operations with counters, if we want counter there is a command for that. Now tablets doesn't support counters, and we need that that read/write/mixed won't even create the counter schema, and not do any counter operations |
Oh, I see. We try to prepare a statement operating on |
Updating cql-stress to latest version. This version contains the fix for scylladb/cql-stress#86
Updating cql-stress to latest version. This version contains the fix for scylladb/cql-stress#86
Updating cql-stress to latest version. This version contains the fix for scylladb/cql-stress#86 (cherry picked from commit e518ae5) # Conflicts: # defaults/test_default.yaml # docker/cql-stress-cassandra-stress/image
Updating cql-stress to latest version. This version contains the fix for scylladb/cql-stress#86 (cherry picked from commit e518ae5) # Conflicts: # defaults/test_default.yaml # docker/cql-stress-cassandra-stress/image
Updating cql-stress to latest version. This version contains the fix for scylladb/cql-stress#86 (cherry picked from commit e518ae5)
Updating cql-stress to latest version. This version contains the fix for scylladb/cql-stress#86 (cherry picked from commit e518ae5)
Updating cql-stress to latest version. This version contains the fix for scylladb/cql-stress#86 (cherry picked from commit e518ae5) # Conflicts: # defaults/test_default.yaml # docker/cql-stress-cassandra-stress/image
Updating cql-stress to latest version. This version contains the fix for scylladb/cql-stress#86 (cherry picked from commit e518ae5) # Conflicts: # defaults/test_default.yaml # docker/cql-stress-cassandra-stress/image
fix: #85
List of tables created for each command:
keyspace1.standard1
tablekeyspace1.counter1
tablekeyspace1.[standard1/counter1]
tables