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

Simplify LinkedDB #3485

Open
yacovm opened this issue Oct 21, 2024 · 1 comment
Open

Simplify LinkedDB #3485

yacovm opened this issue Oct 21, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@yacovm
Copy link
Contributor

yacovm commented Oct 21, 2024

Context and scope
LinkedDB is a database wrapping a KV store that facilitates iteration.

It would simplify the codebase and remove code that needs to be maintained if we make it a wrapper around a database with an iteration functionality such as GoLevelDB.

Discussion and alternatives

It is crucial to do this in a manner that preserves backward compatibility with the previous version of avalanchego, as otherwise we won't be able to upgrade to the new version due to losing the ability to read the latest persisted DB.

After releasing a version with backward compatibility, we would be able to remove the parts that remain for backward compatibility.

Open questions

  1. How do we detect which keys were written using the old version and which were written using the new version?
  2. How do we combine input from the old version and the new version?
@yacovm yacovm added the enhancement New feature or request label Oct 21, 2024
@yacovm
Copy link
Contributor Author

yacovm commented Oct 25, 2024

Alternatively, perhaps it is easier to simply have the old linkedDB be migrated to the new one once the node figures out it has been upgraded, and just use the new version from that point onwards.

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

No branches or pull requests

1 participant