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

Blob files are all deleted after running repair #13090

Open
jonas0616 opened this issue Oct 24, 2024 · 0 comments
Open

Blob files are all deleted after running repair #13090

jonas0616 opened this issue Oct 24, 2024 · 0 comments
Assignees

Comments

@jonas0616
Copy link

jonas0616 commented Oct 24, 2024

When running the repair on a RocksDB database with BlobDB enabled, the repair process completes sucessfully.
However, after the repair, all references to the blob files are missing from the MANIFEST file.
As a result, when the database is opened again, all the blob files are automatically deleted.
This issue is quite alarming; the intention was to repair RocksDB, but instead, it ended up wiping all the data.

Expected behavior

Before running repair, the MANIFEST file includes the blob files' information:

$ ldb manifest_dump --path=MANIFEST-000038 --hex | grep -A 3 'blob files'
--- blob files --- version# 2 ---
blob_file_number: 14 total_blob_count: 1 total_blob_bytes: 380 checksum_method:  checksum_value:  linked_ssts: { 13 } garbage_blob_count: 0 garbage_blob_bytes: 0
blob_file_number: 18 total_blob_count: 1 total_blob_bytes: 380 checksum_method:  checksum_value:  linked_ssts: { 33 } garbage_blob_count: 0 garbage_blob_bytes: 0
blob_file_number: 22 total_blob_count: 1 total_blob_bytes: 380 checksum_method:  checksum_value:  linked_ssts: { 21 } garbage_blob_count: 0 garbage_blob_bytes: 0

Actual behavior

After running repair, the blob files are no longer present in the MANIFEST file:

$ ldb manifest_dump --path=MANIFEST-000003 --hex | grep -A 3 'blob files'

Steps to reproduce the behavior

  1. Create a RocksDB database with BlobDB enabled.
  2. Insert data that generates blob files.
  3. Manually flush the database.
  4. Run repair on the database.
  5. Use ldb to check the MANIFEST after the repair - blob files are missing.
  6. Reopen the database, and observe that all blob files are deleted.
@jonas0616 jonas0616 changed the title Blob files are deleted after running repair Blob files are all deleted after running repair Oct 28, 2024
@jowlyzhang jowlyzhang self-assigned this Nov 4, 2024
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

No branches or pull requests

2 participants