Skip to content

Add bank workload #74

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

Merged
merged 1 commit into from
Nov 6, 2020
Merged

Add bank workload #74

merged 1 commit into from
Nov 6, 2020

Conversation

ligurio
Copy link
Member

@ligurio ligurio commented Oct 29, 2020

Closes #67

@ligurio ligurio marked this pull request as draft October 29, 2020 16:54
@ligurio ligurio force-pushed the add-bank-test branch 8 times, most recently from 7dce735 to 0788752 Compare November 2, 2020 14:39
@ligurio ligurio marked this pull request as ready for review November 2, 2020 15:18
@ligurio ligurio force-pushed the add-bank-test branch 3 times, most recently from fdd6275 to 8f60ae8 Compare November 6, 2020 09:20
In [1] new transaction manager has been added that implements MVCC support.
Without concurrency control, if someone is reading from a database at the same
time as someone else is writing to it, it is possible that the reader will see
a half-written or inconsistent piece of data. In the bank test, we create a
pool of simulated bank accounts, and transfer money between them using
transactions which read two randomly selected accounts, subtract and increment
their balances accordingly, and write the new account values back. Under
snapshot isolation, the total of all accounts should be constant over time. We
read the state of all accounts concurrently, and check for changes in the
total, which suggests read skew or other snapshot isolation anomalies.

There are two kind of test: first one stores bank accounts in a single space
and second one stores each bank account in a separate space.
Original version of tests were used only SQL commands to manipulate accounts
but `transfer` operation requires using transactions which are not supported in
Tarantool [2]. So second version of tests has been added where sequences of SQL
commands required atomicity were replaced by Lua functions `_WITHDRAW` and
`_WITHDRAW_MULTITABLE`.

1. tarantool/tarantool#4897
2. tarantool/tarantool-java#63

Closes #67
@ligurio ligurio merged commit 5fa0fe3 into master Nov 6, 2020
@ligurio ligurio deleted the add-bank-test branch November 6, 2020 10:21
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.

Add a focus test for TXM
1 participant