Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Yashunin committed Nov 14, 2022
1 parent 34fe7f1 commit 5503715
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hnswlib/hnswalg.h
Original file line number Diff line number Diff line change
Expand Up @@ -773,8 +773,11 @@ class HierarchicalNSW : public AlgorithmInterface<dist_t> {


/**
* Remove the deleted mark of the node, does NOT really change the current graph.
*/
* Remove the deleted mark of the node, does NOT really change the current graph.
*
* Note: the method is not safe to use when replacement of deleted elements is enabled
* bacause elements marked as deleted can be completely removed from the index
*/
void unmarkDelete(labeltype label) {
std::unique_lock <std::mutex> lock_table(label_lookup_lock);
auto search = label_lookup_.find(label);
Expand All @@ -791,11 +794,8 @@ class HierarchicalNSW : public AlgorithmInterface<dist_t> {


/**
* Remove the deleted mark of the node.
*
* Note: the method is not safe to use when replacement of deleted elements is enabled
* bacause elements marked as deleted can be completely removed from the index
*/
* Remove the deleted mark of the node.
*/
void unmarkDeletedInternal(tableint internalId) {
assert(internalId < cur_element_count);
if (isMarkedDeleted(internalId)) {
Expand Down

0 comments on commit 5503715

Please sign in to comment.