Skip to content

Add a focus test for TXM #67

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

Closed
ligurio opened this issue Oct 22, 2020 · 0 comments · Fixed by #74
Closed

Add a focus test for TXM #67

ligurio opened this issue Oct 22, 2020 · 0 comments · Fixed by #74
Assignees
Labels

Comments

@ligurio
Copy link
Member

ligurio commented Oct 22, 2020

TXM has been implemented in scope of Transaction engine for memtx engine #4897

It implements MVCC and bank would be a good test for it because bank is a canonical test for MVCC: "For instance, when making a wire transfer between two bank accounts if a reader reads the balance at the bank when the money has been withdrawn from the original account and before it was deposited in the destination account, it would seem that money has disappeared from the bank." via

@ligurio ligurio self-assigned this Oct 29, 2020
ligurio added a commit that referenced this issue Oct 29, 2020
This was referenced Oct 29, 2020
ligurio added a commit that referenced this issue Oct 30, 2020
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.

Closes #67
ligurio added a commit that referenced this issue Oct 30, 2020
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.

Closes #67
ligurio added a commit that referenced this issue Nov 2, 2020
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.

BIGINT support
Interactive transactions in IPROTO #2016

Closes #67
ligurio added a commit that referenced this issue Nov 2, 2020
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.

BIGINT support
Interactive transactions in IPROTO #2016
Add bank tests with Lua functions

Closes #67
ligurio added a commit that referenced this issue Nov 2, 2020
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.

BIGINT support
Interactive transactions in IPROTO #2016
  tarantool/tarantool-java#63
Add bank tests with Lua functions

Closes #67
ligurio added a commit that referenced this issue Nov 2, 2020
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.

BIGINT support
Interactive transactions in IPROTO #2016
  tarantool/tarantool-java#63
Add bank tests with Lua functions

Closes #67
ligurio added a commit that referenced this issue Nov 2, 2020
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.

BIGINT support
Interactive transactions in IPROTO #2016
  tarantool/tarantool-java#63
Add bank tests with Lua functions

Closes #67
ligurio added a commit that referenced this issue Nov 6, 2020
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 [1]. 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-java#63

Closes #67
ligurio added a commit that referenced this issue Nov 6, 2020
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 [1]. 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-java#63

Closes #67
ligurio added a commit that referenced this issue Nov 6, 2020
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 [1]. 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-java#63

Closes #67
ligurio added a commit that referenced this issue Nov 6, 2020
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 added a commit that referenced this issue Nov 6, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants