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

merge operator not associative #104

Open
yangl1996 opened this issue Mar 1, 2020 · 2 comments
Open

merge operator not associative #104

yangl1996 opened this issue Mar 1, 2020 · 2 comments

Comments

@yangl1996
Copy link
Owner

yangl1996 commented Mar 1, 2020

https://github.com/facebook/rocksdb/wiki/Merge-Operator#associativity-vs-non-associativity

Merge operators in blockchain module are not associative. e.g. https://github.com/yangl1996/prism-rust/blob/master/src/blockchain/mod.rs#L1610

Sometimes RocksDb tries to execute the merge operator in the backend, supplying it with values already in the database. This is invalid to our merge operators. E.g. in the case above, the operator takes a singe tuple, while the value stored in the table is a vector of another type.

@wgr523
Copy link
Collaborator

wgr523 commented Mar 5, 2020

I tried to change merge operator. Please review this commit (might be private?) https://github.com/bagavi/prism-smartcontracts/commit/9d830d95ce2442d143c47dd9c1eac020d09f5df6

@yangl1996
Copy link
Owner Author

Will be fixed in the upcoming PR that gets rid of RockdDB in the blockchain db.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants