acelyc111 commented on code in PR #2077:
URL:
https://github.com/apache/incubator-pegasus/pull/2077#discussion_r1692623103
##########
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:
So if pop a file from `_metadata.files ` to download once for
`download_sst_file()`, it would be safe, it's only needed to add lock when pop
a file.
That is to say, pass a copy of `file_meta` object popped to
`download_sst_file()` instead of the index.
--
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]