@@ -974,7 +974,8 @@ idType HNSWIndex<DataType, DistType>::mutuallyConnectNewElement(
974974 // lock.
975975 if (new_node_level_data.numLinks == max_M_cur) {
976976 // The new node cannot add more neighbors
977- this ->log (" Couldn't add all chosen neighbors upon inserting a new node" );
977+ this ->log (VecSimCommonStrings::LOG_DEBUG_STRING,
978+ " Couldn't add all chosen neighbors upon inserting a new node" );
978979 unlockNodeLinks (new_node_level);
979980 unlockNodeLinks (neighbor_graph_data);
980981 break ;
@@ -1350,6 +1351,8 @@ template <typename DataType, typename DistType>
13501351void HNSWIndex<DataType, DistType>::resizeIndexCommon(size_t new_max_elements) {
13511352 assert (new_max_elements % this ->blockSize == 0 &&
13521353 " new_max_elements must be a multiple of blockSize" );
1354+ this ->log (VecSimCommonStrings::LOG_VERBOSE_STRING,
1355+ " Updating HNSW index capacity from %zu to %zu" , this ->maxElements , new_max_elements);
13531356 resizeLabelLookup (new_max_elements);
13541357 visitedNodesHandlerPool.resize (new_max_elements);
13551358 idToMetaData.resize (new_max_elements);
@@ -1445,7 +1448,8 @@ void HNSWIndex<DataType, DistType>::mutuallyUpdateForRepairedNode(
14451448 for (auto chosen_id : chosen_neighbors) {
14461449 if (node_neighbors_idx == max_M_cur) {
14471450 // Cannot add more new neighbors, we reached the capacity.
1448- this ->log (" Couldn't add all the chosen new nodes upon updating %u, as we reached the"
1451+ this ->log (VecSimCommonStrings::LOG_DEBUG_STRING,
1452+ " Couldn't add all the chosen new nodes upon updating %u, as we reached the"
14491453 " maximum number of neighbors per node" ,
14501454 node_id);
14511455 break ;
@@ -1803,7 +1807,8 @@ AddVectorCtx HNSWIndex<DataType, DistType>::storeNewElement(labelType label,
18031807 try {
18041808 new (cur_egd) ElementGraphData (state.elementMaxLevel , levelDataSize, this ->allocator );
18051809 } catch (std::runtime_error &e) {
1806- this ->log (" Error - allocating memory for new element failed due to low memory" );
1810+ this ->log (VecSimCommonStrings::LOG_WARNING_STRING,
1811+ " Error - allocating memory for new element failed due to low memory" );
18071812 throw e;
18081813 }
18091814
0 commit comments