Skip to content
This repository was archived by the owner on Apr 24, 2023. It is now read-only.

chore: remove prefixdb.mtx - #20

Merged
jinsan-line merged 1 commit into
Finschia:v2/developfrom
jinsan-line:remove-prefixdb-mtx
Apr 7, 2021
Merged

jinsan-line merged 1 commit into
Finschia:v2/developfrom
jinsan-line:remove-prefixdb-mtx

Conversation

@jinsan-line

@jinsan-line jinsan-line commented Apr 6, 2021 •

Copy link
Copy Markdown
Contributor

Motivation

  • To increase concurrency, I'd like to remove prefixdb.mtx. It doesn't help to increase concurrency & performance at this moment because the above layers are serialized by their mtx. (e.g, iavl, store.cache, store.cachekv) but I hope to remove these mtxs from bottom to up w/ future works.

Note

  • By the CONTRACT, all db backends are concurrency-safe. As a wrapper, prefixdb doesn't have to protect itself because wrapped db already protects itself.
  • The only concern for me is iterator CONTRACT but I proved it w/ test: contract: no writes on an iterator #18.
  • Please note that batch and iterator are not concurrency-safe. The client should protect it.

How to test

  • make test-prefixdb

@jinsan-line jinsan-line self-assigned this Apr 6, 2021
@jinsan-line jinsan-line changed the title chore: remote prefixdb.mtx chore: remove prefixdb.mtx Apr 6, 2021

@wetcod wetcod left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@jinsan-line
jinsan-line merged commit 09d2326 into Finschia:v2/develop Apr 7, 2021
@jinsan-line
jinsan-line deleted the remove-prefixdb-mtx branch April 7, 2021 03:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants