message: fixup! Synchronize backup and reset policy functions
diff: @@ -3132,10 +3132,6 @@ void CacheManager::BackgroundBackuper::threadMain() {
  InternalBackup();
  }
  - if (new_data_available_ || stop_flag_) {
  - continue;
  - }
  -
  {
  LOG4CXX_DEBUG(logger_, "Backup is done");
  sync_primitives::AutoLock auto_lock(backup_done_lock_);
  @@ -3143,6 +3139,10 @@ void CacheManager::BackgroundBackuper::threadMain() {
  backup_done_.Broadcast();
  }
  + if (new_data_available_ || stop_flag_) {
  + continue;
  + }
  +
  LOG4CXX_DEBUG(logger_, "Wait for a next backup");
  backup_notifier_.Wait(need_backup_lock_);
  }
  @@ -3165,12 +3165,10 @@ void CacheManager::BackgroundBackuper::DoBackup() {
  void CacheManager::BackgroundBackuper::WaitForBackupIsDone() {
  LOG4CXX_AUTO_TRACE(logger_);
  sync_primitives::AutoLock auto_lock(backup_done_lock_);
  - if (!backup_is_in_progress_) {
  - return;
  - }
  -
  + if (backup_is_in_progress_) {
  backup_done_.Wait(auto_lock);
  }
  +}
  EncryptionRequired CacheManager::GetAppEncryptionRequiredFlag(
  const std::string& application) const {
  