Skip to content
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

Open
wants to merge 2 commits into
base: coo-consistency-check
Choose a base branch
from

Conversation

gukj-spel
Copy link

@gukj-spel gukj-spel commented Jul 25, 2024

pr for issue #42, randomly allocate a isolation level for every txn when create test case

  • add isolation level message in description
  • isolation level: READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ,SERIALIZABLE
  • for example: II0-ICI1-ICI2.txt , the description is follow
    #
    # Test case description
    # POPG Pattern: T1 ==II0==> T2 ==ICI1==> T3 ==ICI2==> T1
    # Parameters: #column=2 #txn=3 #operations=3 #variable=3
    # Structure: Sequence-Session-Query
    # Txn Isolation: T1:REPEATABLE-READ,T2:READ-COMMITTED,T3:REPEATABLE-READ
    # When sequence=0, it is a preparation phase, otherwise an execution phase
    #
    

@gukj-spel gukj-spel changed the title feat: randomly allocate a isolation level for every txn when create test case feat: randomly allocate a isolation level for txn when create test case Jul 25, 2024
@@ -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"
Copy link

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 ?

Copy link
Author

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.

"READ-COMMITTED",
"REPEATABLE-READ",
"SERIALIZABLE"
]
Copy link

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

Copy link

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?

Copy link
Author

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.

Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants