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
Contributor

@wezrule wezrule 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 functionality quality improvements This item indicates the need for or supplies a better way to implement existing functionality blocker Some future items cannot be completed until this is merged. labels May 3, 2019
@wezrule wezrule added this to the V19.0 milestone May 3, 2019
@wezrule wezrule requested review from argakiig and cryptocode May 3, 2019 11:56
@wezrule wezrule self-assigned this May 3, 2019
Copy link
Contributor

@cryptocode cryptocode left a comment

Choose a reason for hiding this comment

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

LGTM pending formatting fix

@wezrule wezrule removed the request for review from argakiig May 3, 2019 14:42
@wezrule wezrule merged commit 30a8a8d into nanocurrency:master May 3, 2019
@wezrule wezrule deleted the explicit_read_and_write_txns branch May 3, 2019 14:43
argakiig pushed a commit that referenced this pull request May 6, 2019
* Extend read/write transaction functionality

* Formatting

* Add changes to gui

* Add missing override specifier

* Formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Some future items cannot be completed until this is merged. functionality quality improvements This item indicates the need for or supplies a better way to implement existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants