ruojieranyishen commented on code in PR #2077:
URL:
https://github.com/apache/incubator-pegasus/pull/2077#discussion_r1689432143
##########
src/replica/bulk_load/replica_bulk_loader.cpp:
##########
@@ -590,9 +613,17 @@ void replica_bulk_loader::download_sst_file(const
std::string &remote_dir,
METRIC_VAR_INCREMENT_BY(bulk_load_download_file_bytes, f_size);
// download next file
- if (file_index + 1 < _metadata.files.size()) {
- const file_meta &next_f_meta = _metadata.files[file_index + 1];
- _download_files_task[next_f_meta.name] =
+ get_f_meta = true;
Review Comment:
The `replica_bulk_loader::clear_bulk_load_states` function executes
`_metadata.files.clear()` and `cleanup_download_tasks()`.
Since `cleanup_download_tasks()` does not halt the ongoing
`replica_bulk_loader::download_sst_file`, there's a need for locking access to
`_metadata.files` within `download_sst_file` to prevent concurrency issues.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]