From 3d7ac5943cb3d52ee33ecbd58d0364474baddab2 Mon Sep 17 00:00:00 2001 From: foxspy Date: Sun, 18 Feb 2024 17:23:35 +0800 Subject: [PATCH] clear future after wait (#386) Signed-off-by: xianliang --- thirdparty/DiskANN/src/index.cpp | 1 + thirdparty/DiskANN/src/partition_and_pq.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/thirdparty/DiskANN/src/index.cpp b/thirdparty/DiskANN/src/index.cpp index 86157932..3727e4d6 100644 --- a/thirdparty/DiskANN/src/index.cpp +++ b/thirdparty/DiskANN/src/index.cpp @@ -1648,6 +1648,7 @@ namespace diskann { } } knowhere::WaitAllSuccess(futures); + futures.clear(); diff = std::chrono::high_resolution_clock::now() - s; inter_time += diff.count(); diff --git a/thirdparty/DiskANN/src/partition_and_pq.cpp b/thirdparty/DiskANN/src/partition_and_pq.cpp index e3eb0da3..5b6bcdcd 100644 --- a/thirdparty/DiskANN/src/partition_and_pq.cpp +++ b/thirdparty/DiskANN/src/partition_and_pq.cpp @@ -578,6 +578,7 @@ int generate_pq_data_from_pivots(const std::string data_file, })); } knowhere::WaitAllSuccess(futures); + futures.clear(); if (num_centers > 256) { compressed_file_writer.write(