Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
fix(bulk_load): remove possible old directory when start bulk load (#828
Browse files Browse the repository at this point in the history
)
  • Loading branch information
hycdong committed May 7, 2021
1 parent 871f01f commit 2bcb495
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/replica/bulk_load/replica_bulk_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,11 @@ error_code replica_bulk_loader::start_download(const std::string &remote_dir,
}

// reset local bulk load context and state
if (_status == bulk_load_status::BLS_INVALID) {
// try to remove possible garbage bulk load data when actually starting bulk load
remove_local_bulk_load_dir(utils::filesystem::path_combine(
_replica->_dir, bulk_load_constant::BULK_LOAD_LOCAL_ROOT_DIR));
}
if (status() == partition_status::PS_PRIMARY) {
_replica->_primary_states.cleanup_bulk_load_states();
}
Expand Down

0 comments on commit 2bcb495

Please sign in to comment.