rocksdb
rocksdb copied to clipboard
rocksdb restart failed
Note: Please use Issues only for bug reports. For questions, discussions, feature requests, etc. post to dev group: https://groups.google.com/forum/#!forum/rocksdb or https://www.facebook.com/groups/rocksdb.dev
Expected behavior
restart successfully
Actual behavior
restart failed
Steps to reproduce the behavior
1) stop rocksdb 2) move the rocksdb data 3) open rocksdb with the same path, the following error will be reported: Check failed: status.ok() Corruption: Corruption: IO error: No such file or directory: While open a file for random read: xxxx/data/000017. ldb: No such file or directory
This step seems problematic: "2) move the rocksdb data". Why would the DB be openable if the data is moved?
This step seems problematic: "2) move the rocksdb data". Why would the DB be openable if the data is moved?
I am using rocksdb for restore operation. Before doing restore, I do the following:
- move the
data
directory and rename it todata.bak
- Then start a new rocksdb with the same path(before starting, we created the data directory), then ingest the backed up sst file
- If the second step fails, use the first step
data.bak
to restore the state before restore
The problem is the second step, use the same path to start a new rocksdb. Starting rocksdb failed, throwing the error below:
Check failed: status.ok() Corruption: Corruption: IO error: No such file or directory: While open a file for random read: xxxx/data/000017.ldb: No such file or directory
Then start a new rocksdb with the same path(before starting, we created the data directory), then ingest the backed up sst file
Only SST files generated by SstFileWriter can be ingested via DB::IngestExternalFile()
APIs.
Then start a new rocksdb with the same path(before starting, we created the data directory), then ingest the backed up sst file
Only SST files generated by SstFileWriter can be ingested via
DB::IngestExternalFile()
APIs.
yeah. But before I ingest the sst file, starting an empty rocksdb fails. The ingest sst file has not been executed yet.
Maybe strace the process to find out what are the paths for the CURRENT file and MANIFEST file it is reading during step two? It must be reading a MANIFEST at least considering it expects a table file number 17 to exist.
@ajkr I had the same problem,ldb repair --db=/opt/data ,later,can to get data, but not put data
[15:05:15.380] [ERROR] com.supcon.kvdb.server.rocksdb.RocksDbClient.initRocksdb(RocksDbClient.java:184) - RocksDB init failure!! error:Corruption: IO error: No such file or directory: While open a file for random read: /opt/data/007500.sst: No such file or directory The file /opt/data/MANIFEST-007502 may be corrupted. org.rocksdb.RocksDBException: Corruption: IO error: No such file or directory: While open a file for random read: /opt/data/007500.sst: No such file or directory The file /opt/data/MANIFEST-007502 may be corrupted.