-
Notifications
You must be signed in to change notification settings - Fork 6
Use separate mutex for locked outputs #245
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
Conversation
This feels like somewhere is calling a wallet method that locks the mutex within the open db transaction rather than an issue with the internal locking. The locking is fairly intentional to prevent invalid proofs. I'd rather not change it unless we're confident it's not breaking something else. |
The obvious candidate is So all it takes is for one goroutine to try and open a database transaction while holding the wallet lock and another one acquiring the wallet lock from within an open database connection. Which could in theory happen now if |
641887d
to
3319301
Compare
Renter tests are 🟢 - verified here https://github.com/SiaFoundation/renterd/pull/1896/checks |
...moving_the_tip_from_memory_and_returning_it_alongside_the_unspent_elements_from_the_store.md
Outdated
Show resolved
Hide resolved
4020d67
to
545526f
Compare
This PR reverts a change we made that introduced a deadlock in the locking behaviour. Instead of keeping the
tip
in memory, we return it from the store alongside the unspent elements. It also improves the overall locking by covering the fetching of unspent element under the lock as well.