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

Store db metadata file in the root data directory. #46

Conversation

AbdelStark
Copy link
Contributor

PR description

The database metadata file should be stored in the root data directory rather than the database subdirectory. The database subdirectory is owned by the database itself and should not be directly manipulated by the node.

  • first look in the data directory for the metadata file
  • if the metadata file is found there, process it as normal
  • if no metadata file is found in the root directory, look in the database subdirectory
  • if the file is found here, copy it to the root directory, and run based on the root directory version

Fixed Issue(s)

EdJoJob and others added 4 commits September 24, 2019 09:02
Signed-off-by: Edward Evans <[email protected]>
Signed-off-by: Abdelhamid Bakhta <[email protected]>
The database metadata file should be stored in the root data directory rather than the database subdirectory.
The database subdirectory is owned by the database itself and should not be directly manipulated by the node.
- first look in the data directory for the metadata file
- if the metadata file is found there, process it as normal
- if no metadata file is found in the root directory, look in the database subdirectory
- if the file is found here, copy it to the root directory, and run based on the root directory version

Signed-off-by: Abdelhamid Bakhta <[email protected]>
…metadata-root-data-dir

Signed-off-by: Abdelhamid Bakhta <[email protected]>
@AbdelStark AbdelStark added the enhancement New feature or request label Sep 24, 2019
Copy link
Contributor

@shemnon shemnon left a comment

Choose a reason for hiding this comment

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

LGTM.

Do we think we need a review from the RocksDBPlugin folks?

Signed-off-by: Abdelhamid Bakhta <[email protected]>
Copy link
Contributor Author

@AbdelStark AbdelStark left a comment

Choose a reason for hiding this comment

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

LGTM.

Do we think we need a review from the RocksDBPlugin folks?

That make sense. I'll ask their review.

@AbdelStark AbdelStark merged commit aa264b3 into hyperledger:master Sep 24, 2019
@AbdelStark AbdelStark deleted the feature/store-db-metadata-root-data-dir branch September 25, 2019 07:08
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

Successfully merging this pull request may close these issues.

3 participants