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

Steps toward making IDENTITY file obsolete #13019

Closed
wants to merge 4 commits into from

Conversation

pdillinger
Copy link
Contributor

@pdillinger pdillinger commented Sep 17, 2024

Summary:

  • Set write_dbid_to_manifest=true by default
  • Add new option write_identity_file (default true) that allows us to opt-in to future behavior without identity file
  • Refactor related DB open code to minimize code duplication

Recommend hiding whitespace changes for review

Intended follow-up: add support to ldb for reading and even replacing the DB identity in the manifest. Could be a variant of update_manifest command or based on it.

Test Plan: unit tests and stress test updated for new functionality

Summary:
* Set write_dbid_to_manifest=true by default
* Add new option write_identity_file (default true) that allows us to
  opt-in to future behavior without identity file
* Refactor related DB open code to minimize code duplication

Test Plan: unit tests updated for new functionality
@facebook-github-bot
Copy link
Contributor

@pdillinger has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@pdillinger has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@pdillinger has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@anand1976 anand1976 left a comment

Choose a reason for hiding this comment

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

LGTM. Does it make sense to add an API and/or ldb command for a user to to read the DB ID? The IDENTITY file is human readable.

@pdillinger
Copy link
Contributor Author

LGTM. Does it make sense to add an API and/or ldb command for a user to to read the DB ID? The IDENTITY file is human readable.

There is DB::GetDbIdentity(), but yes there should be ldb command to read and even overwrite the DB identity. I'll note that as intended follow-up before disabling identity file by default.

@facebook-github-bot
Copy link
Contributor

@pdillinger merged this pull request in 98c33cb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants