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

Allow long running read transactions to be broken up #1951

Merged
merged 5 commits into from May 3, 2019

Conversation

@wezrule
Copy link
Collaborator

commented May 3, 2019

This enables long running read transactions to be broken up and reuse the same transaction object instead of creating a new one each time periodically which is more efficient as per the official documentation. This will help with some of the forthcoming transaction breakup tasks.

As read/write now return different concrete objects (to make use of RAII for automatic cleanup) they can no longer be specified by using a bool argument (which is a good thing imo). This is what most of the changes done are for.

It is currently possible to pass a read only transaction object to something that expects a write transaction, this is only apparent at run-time. This can now be made a compile-time constraint by specifying a write_transaction. Widespread changes can be made to accommodate this but were not done here as to make only necessary changes during the RC.

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

@wezrule wezrule requested review from argakiig and cryptocode May 3, 2019

@wezrule wezrule self-assigned this May 3, 2019

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

@cryptocode
Copy link
Collaborator

left a comment

LGTM pending formatting fix

@wezrule wezrule removed the request for review from argakiig May 3, 2019

@wezrule wezrule merged commit 30a8a8d into nanocurrency:master May 3, 2019

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@wezrule wezrule deleted the wezrule:explicit_read_and_write_txns branch May 3, 2019

argakiig added a commit that referenced this pull request May 6, 2019

Allow long running read transactions to be broken up (#1951)
* Extend read/write transaction functionality

* Formatting

* Add changes to gui

* Add missing override specifier

* Formatting

@zhyatt zhyatt moved this from During RC to RC2 (2019-05-06) in V19 May 6, 2019

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.