-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: randomly allocate a isolation level for txn when create test case #58
base: coo-consistency-check
Are you sure you want to change the base?
Conversation
src/dbtest/src/mda_generate.py
Outdated
@@ -801,6 +816,8 @@ def write_description(file_name, txn_num, op_num, data_num): | |||
description += "# Parameters: #column=2 #txn=" + str(txn_num) + " #operations=" + str(op_num) + " #variable=" + str(data_num) + "\n" | |||
description += "# Structure: Sequence-Session-Query" + "\n" | |||
description += "# When sequence=0, it is a preparation phase, otherwise an execution phase" + "\n" | |||
description += "# When sequence=0, it is a preparation phase, otherwise an execution phase" + "\n" |
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.
why print this "description += "# When sequence=0, it is a preparation phase, otherwise an execution phase" + "\n"" 2 times ?
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.
Oh! my mistake, I'll fix it.
src/dbtest/src/mda_generate.py
Outdated
"READ-COMMITTED", | ||
"REPEATABLE-READ", | ||
"SERIALIZABLE" | ||
] |
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.
these 4 isolation level is just for mysql or some similar dbms, other dbms such as mongodb, oceanbase doesn't support the same isolation level
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.
we can support your feature in mysql, and then extend it to other dbms. it's essential to limit the scope of your current commit to mysql, do you have any idea?
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.
Ok, I'll limit the scope of the isolation level. Since the first parameter of mda_generate is dbms type, my idea is to define different isolation level for different dbms. I will write a function to do this.
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.
ok, and please make sure your commit can be run on every dbms you want to support. I suggest you firstly add a function to control the scope, and limit it on mysql. And maybe we can extend to other dbms one by one
pr for issue #42, randomly allocate a isolation level for every txn when create test case