|
|
@ -1805,7 +1805,7 @@ class StressTest { |
|
|
|
thread->rand.Uniform(FLAGS_backup_one_in) == 0) { |
|
|
|
thread->rand.Uniform(FLAGS_backup_one_in) == 0) { |
|
|
|
std::string backup_dir = FLAGS_db + "/.backup" + ToString(thread->tid); |
|
|
|
std::string backup_dir = FLAGS_db + "/.backup" + ToString(thread->tid); |
|
|
|
BackupableDBOptions backup_opts(backup_dir); |
|
|
|
BackupableDBOptions backup_opts(backup_dir); |
|
|
|
BackupEngine* backup_engine; |
|
|
|
BackupEngine* backup_engine = nullptr; |
|
|
|
Status s = BackupEngine::Open(FLAGS_env, backup_opts, &backup_engine); |
|
|
|
Status s = BackupEngine::Open(FLAGS_env, backup_opts, &backup_engine); |
|
|
|
if (s.ok()) { |
|
|
|
if (s.ok()) { |
|
|
|
s = backup_engine->CreateNewBackup(db_); |
|
|
|
s = backup_engine->CreateNewBackup(db_); |
|
|
@ -1817,6 +1817,9 @@ class StressTest { |
|
|
|
printf("A BackupEngine operation failed with: %s\n", |
|
|
|
printf("A BackupEngine operation failed with: %s\n", |
|
|
|
s.ToString().c_str()); |
|
|
|
s.ToString().c_str()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (backup_engine != nullptr) { |
|
|
|
|
|
|
|
delete backup_engine; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (FLAGS_compact_files_one_in > 0 && |
|
|
|
if (FLAGS_compact_files_one_in > 0 && |
|
|
|