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

Allow full and light client on-disk databases to co-exist #6880

Closed
@expenses

Description

@expenses
Contributor

This is a nice small issue to give the light client some love. If you run the full node for a bit, then a light node with --light, you get the following error:

Error: Service(Client(Backend("Unexpected database type. Expected: light")))

It's easy enough to change the paths where the databases are put, it might be best to put the full db in /db/full/ and the light db in /db/light.

Activity

added
Z0-trivialWriting the issue is of the same difficulty as patching the code.
on Aug 12, 2020
expenses

expenses commented on Aug 12, 2020

@expenses
ContributorAuthor

It's also important to consider that moving the path of the full db means that you have to add code that migrates from the old path.

changed the title [-]Allow full and light on-disk databases to co-exist[/-] [+]Allow full and light client on-disk databases to co-exist[/+] on Aug 12, 2020
expenses

expenses commented on Aug 17, 2020

@expenses
ContributorAuthor

It's easy enough to change the paths where the databases are put, it might be best to put the full db in /db/full/ and the light db in /db/light.

(Pinging to get a consensus) @seunlanlege @rakanalh @danforbes @gnunicorn I believe this would be the best way to things, anyone else have an opinion?

rakanalh

rakanalh commented on Aug 17, 2020

@rakanalh
Contributor

I think this is worth doing as i imagine there would be use cases where one would want to switch between the two.

seunlanlege

seunlanlege commented on Aug 17, 2020

@seunlanlege
Contributor

+1

niklasad1

niklasad1 commented on Aug 25, 2020

@niklasad1
Contributor

Sounds good to me, however, duplicate of #2204 but the description is better in this issue so feel free to close #2204

hirschenberger

hirschenberger commented on Apr 18, 2021

@hirschenberger
Contributor

I'm currently working on this and different database roles are stored in the corresponding subdirectories as discussed above.

But how should we deal with existing databases to avoid users to resync their state. I suggest migrating to the new structure by:

  • checking for the existence of the said dir and if they don't exist
  • check if the current role matches the database role
  • create the new dir
  • move the existing data to the new dir.

Is it possible to move a ParityDb and RocksDb by just moving the files?

bkchr

bkchr commented on Apr 19, 2021

@bkchr
Member

Is it possible to move a ParityDb and RocksDb by just moving the files?

Yes

added a commit that references this issue on Apr 22, 2021
f4c53af

14 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    U2-some_time_soonIssue is worth doing soon.Z0-trivialWriting the issue is of the same difficulty as patching the code.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @rakanalh@hirschenberger@bkchr@expenses@niklasad1

      Issue actions

        Allow full and light client on-disk databases to co-exist · Issue #6880 · paritytech/substrate