mirror of https://github.com/milvus-io/milvus.git
fix: segv if the LoadArrowReaderFromRemote run at the exception path (#41071)
issue: #41067 pr: #41069 Signed-off-by: chyezh <chyezh@outlook.com>pull/41080/head
parent
37a533fe6d
commit
8065c801f2
|
@ -879,7 +879,7 @@ LoadArrowReaderFromRemote(const std::vector<std::string>& remote_files,
|
|||
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…
Reference in New Issue