Skip to content

Commit

Permalink
Set isolation level in the transaction runner
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffxy committed Jul 19, 2023
1 parent 80e4bec commit 1fd32f1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions workloads/IMDB_extended/run_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ def noop_handler(_signal, _frame):
brad.connect()
db = BradDatabase(brad)

# Set the isolation level.
db.execute_sync(
f"SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL {args.isolation_level}"
)

# Signal that we are ready to start and wait for other clients.
start_queue.put("")
_ = stop_queue.get()
Expand Down Expand Up @@ -142,6 +147,12 @@ def main():
default=1,
help="The scale factor used to generate the dataset.",
)
parser.add_argument(
"--isolation-level",
type=str,
default="REPEATABLE READ",
help="The isolation level to use when running the transactions.",
)
parser.add_argument("--brad-host", type=str, default="localhost")
parser.add_argument("--brad-port", type=int, default=6583)
args = parser.parse_args()
Expand Down

0 comments on commit 1fd32f1

Please sign in to comment.