feat: randomly allocate a isolation level for txn when create test case#58
feat: randomly allocate a isolation level for txn when create test case#58gukj-spel wants to merge 2 commits intoTencent:coo-consistency-checkfrom
Conversation
src/dbtest/src/mda_generate.py
Outdated
| 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.
why print this "description += "# When sequence=0, it is a preparation phase, otherwise an execution phase" + "\n"" 2 times ?
src/dbtest/src/mda_generate.py
Outdated
| "READ-COMMITTED", | ||
| "REPEATABLE-READ", | ||
| "SERIALIZABLE" | ||
| ] |
There was a problem hiding this comment.
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.
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.
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.
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