Skip to content
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

Makes sure a write lock can be avoided when launching an inactive_node #1967



2 participants
Copy link

commented May 8, 2019

CLI commands can currently open a write lock on the ledger database when they don't need to. When using --fast_bootstrap and aren't synced yet or if there is any other long write transaction running, simple commands like nano_node --wallet_create can end up taking a few minutes. A few places where writes were being used are now checked in a pre-pass by using a read transaction to see whether the write is actually required (after first initialization of the ledger, they generally aren't needed).

I found that the read transaction needs to be committed when opening databases (not sure why), but I've replaced abort with that. This is also what it is prior to #1951.

@wezrule wezrule added this to the V19.0 milestone May 8, 2019

@wezrule wezrule requested a review from cryptocode May 8, 2019

@wezrule wezrule self-assigned this May 8, 2019

@zhyatt zhyatt added this to During RC in V19 May 8, 2019

wezrule added some commits May 8, 2019

Copy link

left a comment


@wezrule wezrule merged commit 6ca0699 into nanocurrency:master May 9, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed

@wezrule wezrule deleted the wezrule:remote_write_lock_inactive_node branch May 9, 2019

@zhyatt zhyatt moved this from During RC to RC 3 (TBD) in V19 May 12, 2019

argakiig added a commit to argakiig/raiblocks that referenced this pull request May 22, 2019

Makes sure a write lock can be avoided when launching an inactive_node (

* Makes sure a write lock can be avoided when launching an inactive_node

* Update test so it doesn't make other tests fail

* Forgot to wait on write lock promise
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.