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

CURRENT file is not synced #74

Closed
cmumford opened this issue Sep 9, 2014 · 2 comments
Closed

CURRENT file is not synced #74

cmumford opened this issue Sep 9, 2014 · 2 comments
Assignees

Comments

@cmumford
Copy link
Contributor

cmumford commented Sep 9, 2014

Original issue 68 created by thomas.bakketun on 2012-01-16T16:25:33.000Z:

What steps will reproduce the problem?

  1. Open an existing database.
  2. Within 30 seconds force off the computer.
  3. Reboot computer. CURRENT file is corrupt. Database can't be opened.

What is the expected output? What do you see instead?

The CURRENT file is corrupt. It contains 16 null bytes instead of the expected content.

What version of the product are you using? On what operating system?

Ubuntu Server 10.10.
The leveldb version included in Riak 1.0.2. Probably the one found here:
https://github.com/basho/eleveldb/tree/master/c_src/leveldb

Please provide any additional information below.

It doesn't matter if the sync option is true or false. Tests indicate that the CURRENT file is never explicitly synced to disk. Since this is a memory mapped file, it can take quite a long time before it is synced. If we wait a minute between opening the database and forcing off the server no corruption occurs.

@cmumford cmumford self-assigned this Sep 9, 2014
@cmumford
Copy link
Contributor Author

cmumford commented Sep 9, 2014

Comment #1 originally posted by sanjay@google.com on 2012-01-18T18:05:10.000Z:

Thanks for the report. You are correct. I have a fix in the works.

I hope you didn't lose any data. If you did, you should be able
to recover it by replacing the corrupted CURRENT file with one
that contains a single line of the form:
MANIFEST-000002
Replace the "000002" with the name of the newest MANIFEST file
that doesn't seem empty. Though to be safe, try it in a copy of
the leveldb directory first.

@cmumford
Copy link
Contributor Author

cmumford commented Sep 9, 2014

Comment #2 originally posted by sanjay@google.com on 2012-01-25T23:13:57.000Z:

Fixed in change 3c8be10

@cmumford cmumford closed this as completed Sep 9, 2014
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

1 participant