-
Notifications
You must be signed in to change notification settings - Fork 451
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
Replace get
by select.limit
in BandwidthDatabase.get_latest_transaction
#6821
Conversation
retest this please |
1 similar comment
retest this please |
retest this please |
retest this please |
Unfortunately, GUI tests are dramatically unstable, so, I'm opening the PR to review as is (with the failed GUI test). |
src/tribler/core/components/bandwidth_accounting/db/database.py
Outdated
Show resolved
Hide resolved
src/tribler/core/components/bandwidth_accounting/db/database.py
Outdated
Show resolved
Hide resolved
src/tribler/core/components/bandwidth_accounting/db/database.py
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing this! We indeed missed this case 👍 .
By default, store_all_transactions
should be set to False
on the end-user side so I don't think this would affect end users under normal circumstances. We actually added the store_all_transactions
option to perform network analytics and to get insights in the dynamics of bandwidth transfers (since we would like to analyse as much transactions as possible). However, a user is able enable this flag by enabling the crawler mode of the bandwidth component. Maybe this is what happened and triggered the bug.
This PR fixes #6802.
It seems possible to create a multiple transactions for the given pair or
public_key_a
andpublic_key_b
by settingbandwidth_database.store_all_transactions
toTrue
:tribler/src/tribler/core/components/bandwidth_accounting/db/transaction.py
Lines 151 to 161 in ec35106
That's why
BandwidthDatabase.get_latest_transaction
should be ready for this situation.