Skip to content

Add abstraction to the db types#232

Merged
dangershony merged 8 commits intomasterfrom
db-abstraction
Nov 19, 2020
Merged

Add abstraction to the db types#232
dangershony merged 8 commits intomasterfrom
db-abstraction

Conversation

@dangershony
Copy link
Copy Markdown
Member

This PR will add a new DbType that can be set in the command line parameters.

-dbtype=[rocksdb,leveldb] default is leveldb

Copy link
Copy Markdown
Member

@sondreb sondreb left a comment

Choose a reason for hiding this comment

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

Good work, appears there might be one issue that might cause a crash due to casting? Also seperate leveldb and rocksdb in some places.

Comment thread src/Features/Blockcore.Features.BlockStore/BlockStoreQueue.cs Outdated
Comment thread src/Features/Blockcore.Features.BlockStore/BlockStoreFeature.cs
Copy link
Copy Markdown
Member

@sondreb sondreb left a comment

Choose a reason for hiding this comment

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

Can the code throw exception if a dbtype is specified that is not yet supported? I couldn't find the enum code if it contains only the 2 supported or 4?

Comment thread src/Blockcore/Utilities/Store/LeveldbKeyValueRepository.cs
Comment thread src/Features/Blockcore.Features.BlockStore/BlockStoreQueue.cs Outdated
@MithrilMan
Copy link
Copy Markdown
Contributor

I'll take some time later to do a proper review on code

@MithrilMan
Copy link
Copy Markdown
Contributor

here my implementation #235

@dangershony dangershony merged commit 34bcfa4 into master Nov 19, 2020
@dangershony dangershony deleted the db-abstraction branch November 19, 2020 14:36
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

Successfully merging this pull request may close these issues.

3 participants