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

Update service db to use store #1244

Merged
merged 4 commits into from
Aug 23, 2019
Merged

Update service db to use store #1244

merged 4 commits into from
Aug 23, 2019

Conversation

NicolasMahe
Copy link
Member

@NicolasMahe NicolasMahe commented Aug 22, 2019

Dependant on #1243

  • Remove useless interface ServiceDB
  • Rename LevelDBServiceDB to ServiceDB
  • Update ServiceDB to accept a store instead
  • Update rest of codebase and tests

@NicolasMahe NicolasMahe added waiting dependent pr release:change Pull requests that change something existant experimental labels Aug 22, 2019
@NicolasMahe NicolasMahe added this to the next milestone Aug 22, 2019
@NicolasMahe NicolasMahe self-assigned this Aug 22, 2019
@NicolasMahe NicolasMahe changed the title Cosmos/service db Update service db to use store Aug 22, 2019
database/service_db.go Outdated Show resolved Hide resolved
database/service_db.go Outdated Show resolved Hide resolved
@mesg-bot
Copy link
Member

This pull request has been mentioned on MESG Community. There might be relevant details there:

https://forum.mesg.com/t/network-implementation-with-cosmossdk/304/15

database/service_db.go Outdated Show resolved Hide resolved
@@ -82,7 +84,10 @@ func TestServiceDBDelete(t *testing.T) {
require.IsType(t, &ErrNotFound{}, err)
}

// TOFIX: the database is not thread safe anymore...
Copy link
Contributor

Choose a reason for hiding this comment

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

the database is still thread safe, but the question is why the transaction has gone

Copy link
Member Author

Choose a reason for hiding this comment

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

kvstore does not implement transaction as it should modify and read the store one transaction at a time. so they don't need concurrent access..

database/service_db.go Outdated Show resolved Hide resolved
@NicolasMahe NicolasMahe merged commit 245731f into dev Aug 23, 2019
@NicolasMahe NicolasMahe deleted the cosmos/service-db branch August 23, 2019 10:39
@NicolasMahe NicolasMahe removed the release:change Pull requests that change something existant label Sep 6, 2019
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.

4 participants