Skip to content

bank*: distribute initial balances uniformly #99

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 24, 2021

Conversation

Totktonada
Copy link
Member

Before this commit the initial distribution was the following: first
account has total-amount balances, other 9 ones have zero balance.

From time to time is appears that there are no attempts to transfer from
the first account. It means that all transfers are marked as failed and
the history analysis reports fail.

Even when there are some successful transfers, there are many attempts
to transfer from an account with zero balance: those transfers are
useless in terms of tarantool testing.

This commit changes the initial distribution to the uniform one and
resolves the problems, which are described above. See the linked issue
for details.

Aside of the problematic bank-lua I changed other banking tests in the
same way to unify the approach. How each test is changed:

  • bank-lua: [100 0 0 0 0 0 0 0 0 0] -> [10 10 10 10 10 10 10 10 10 10].
  • bank-multitable-lua: the test already distributes initial balances
    uniformly, but hardcodes balance value. Now it is deduced from the
    total-amount parameter.
  • bank: same as bank-lua.
  • bank-multitable: same as bank-lua.

'bank' and 'bank-multitable' fixes are blind, because they're disabled.
See #83.

'bank-lua' and 'bank-multitable-lua' are passed in a manual run.
'bank-lua' gives 2-3 failed transfers of ~40 ones. Before it was like
5-15 successful ones of 30-40. (I have no representative statistics,
just looked over several runs in CI, but the numbers looks expected.)

Fixes #94

@Totktonada Totktonada requested a review from ligurio November 14, 2021 17:02
@Totktonada
Copy link
Member Author

@ligurio Please, look if time permits. My reason to fix it is just because I don't want to see those periodical fails.

I tested it manually using CI. The results are here (those logs will be expired after some time). However I tried cluster testing as well and persisted logs and artifacts in #98. Don't be confused by another commit hash: the code is the same, I just updated the commit message.

Copy link
Member

@ligurio ligurio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I like your idea to distribute balances uniformly.

@Totktonada Totktonada force-pushed the Totktonada/gh-94-bank-same-initial-balances branch from 6e4f54a to 5149408 Compare November 20, 2021 19:48
@Totktonada
Copy link
Member Author

Re-verified after review fixes: results.

@Totktonada Totktonada requested a review from ligurio November 20, 2021 20:57
@Totktonada Totktonada force-pushed the Totktonada/gh-94-bank-same-initial-balances branch 2 times, most recently from c9761c5 to ba86d91 Compare November 23, 2021 15:23
Before this commit the initial distribution was the following: first
account has `total-amount` balances, other 9 ones have zero balance.

From time to time is appears that there are no attempts to transfer from
the first account. It means that all transfers are marked as failed and
the history analysis reports fail.

Even when there are some successful transfers, there are many attempts
to transfer from an account with zero balance: those transfers are
useless in terms of tarantool testing.

This commit changes the initial distribution to the uniform one and
resolves the problems, which are described above. See the linked issue
for details.

Aside of the problematic bank-lua I changed other banking tests in the
same way to unify the approach. How each test is changed:

* bank-lua: [100 0 0 0 0 0 0 0 0 0] -> [10 10 10 10 10 10 10 10 10 10].
* bank-multitable-lua: the test already distributes initial balances
  uniformly, but hardcodes balance value. Now it is deduced from the
  `total-amount` parameter.
* bank: same as bank-lua.
* bank-multitable: same as bank-lua.

'bank' and 'bank-multitable' fixes are blind, because they're disabled.
See #83.

'bank-lua' and 'bank-multitable-lua' are passed in a manual run.
'bank-lua' gives 2-3 failed transfers of ~40 ones. Before it was like
5-15 *successful* ones of 30-40. (I have no representative statistics,
just looked over several runs in CI, but the numbers looks expected.)

Fixes #94
@Totktonada
Copy link
Member Author

Re-verified after review fixes: results.

@ligurio ligurio merged commit 5493201 into master Nov 24, 2021
@ligurio ligurio deleted the Totktonada/gh-94-bank-same-initial-balances branch November 24, 2021 07:39
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.

bank-lua fails with 1.8% probability by construction
2 participants