mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-02-02 01:06:41 +08:00
fix: Fix tasks will panic if one of them throw an exception. (#40760)
issue: #40690 pr: https://github.com/milvus-io/milvus/pull/40691 Signed-off-by: sunby <sunbingyi1992@gmail.com>
This commit is contained in:
parent
70ad96ffb3
commit
d09483809c
@ -914,7 +914,7 @@ LoadFieldDatasFromRemote(const std::vector<std::string>& remote_files,
|
||||
std::vector<std::future<FieldDataPtr>> futures;
|
||||
futures.reserve(remote_files.size());
|
||||
for (const auto& file : remote_files) {
|
||||
auto future = pool.Submit([&]() {
|
||||
auto future = pool.Submit([rcm, file]() {
|
||||
auto fileSize = rcm->Size(file);
|
||||
auto buf = std::shared_ptr<uint8_t[]>(new uint8_t[fileSize]);
|
||||
rcm->Read(file, buf.get(), fileSize);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user