You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I specify the value for "share_table_files" as "false", and "destroy_old_data" as "true" - i do not want incremental backups and all the older backups should be deleted. However this gives the following error(when I run the above code):
IO error: /tmp/rocksdb_backup/shared/: No such file or directory
Segmentation fault (core dumped)
I suspect we are checking for the "/shared/" folder by default in GarbageCollect() - {which is being called by Initialize}, even when we can provide an option where the shared folder does not get created. The line is :
Summary:
See a bug report here: #921
The fix is to not check the shared/ directory if share_table_files is false. We could also check FileExists() before GetChildren(), but that will add extra latency when Env is Hdfs :(
Test Plan: added a unit test
Reviewers: rven, sdong, IslamAbdelRahman, yhchiang, anthony
Reviewed By: anthony
Subscribers: dhruba, leveldb
Differential Revision: https://reviews.facebook.net/D52593
Pasting my sample code below:
include "rocksdb/db.h"
include "rocksdb/utilities/backupable_db.h"
include
using namespace rocksdb;
int main() {
Options options;
options.create_if_missing = true;
DB* db;
DB::Open(options, "/tmp/rocksdb", &db);
db->Put(WriteOptions(), "key1", "value");
BackupEngine* backup_engine;
Status s = BackupEngine::Open(Env::Default(), BackupableDBOptions("/tmp/rocksdb_backup",nullptr,false,nullptr,false,true,true,0,0) , &backup_engine);
std::cout << s.ToString() << std::endl;
backup_engine->CreateNewBackup(db);
delete db;
delete backup_engine;
}
I specify the value for "share_table_files" as "false", and "destroy_old_data" as "true" - i do not want incremental backups and all the older backups should be deleted. However this gives the following error(when I run the above code):
IO error: /tmp/rocksdb_backup/shared/: No such file or directory
Segmentation fault (core dumped)
I suspect we are checking for the "/shared/" folder by default in GarbageCollect() - {which is being called by Initialize}, even when we can provide an option where the shared folder does not get created. The line is :
rocksdb/utilities/backupable/backupable_db.cc
Line 1350 in 7810aa8
The text was updated successfully, but these errors were encountered: