-
Notifications
You must be signed in to change notification settings - Fork 1k
Remove ChangeSet from StoreView
#3739
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
I need this for Related to: #3669 |
@superboyiii could you test it? |
Ping @neo-project/core |
protected DataCache(bool readOnly) | ||
{ | ||
if (!readOnly) | ||
_changeSet = []; |
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.
is this the same as _changeSet = null; ?
cause you have public bool IsReadOnly => _changeSet == null;
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.
is this the same as _changeSet = null; ?
cause you have
public bool IsReadOnly => _changeSet == null;
Line 87 creates an empty set
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.
Starting being null
@neo-project/core someone can review it? |
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.
This affects the core functionality of the node. I request a benchmark and need more tests.
What test do you need? it's already tested the exception while is commited in real only mode |
@cschuchardt88 take into account that this is not only an optimization, this disable the possibility of commit in a read only data view, something that never should happen, and before this pr, can be done |
* Speed up Read only storage * Add ut * Fix ut * Format * Fix CloneCache * Rename * change error message * Fix clone cache tests * Fix merge * Update UT_MemoryStore.cs * Fix build * Update src/Neo/Persistence/StoreCache.cs --------- Co-authored-by: Jimmy <[email protected]> Co-authored-by: Christopher Schuchardt <[email protected]> Co-authored-by: NGD Admin <[email protected]>
Description
ChangeSet was removed when the Storage is readOnly, calls to
NeoSystem.StoreView
will be improved.Fixes # (issue)
Type of change
How Has This Been Tested?
Test Configuration:
Checklist: