8000 small_world_graph skips first element in AddBatch when using multiple index threads · Issue #533 · nmslib/nmslib · GitHub
[go: up one dir, main page]

Skip to content

small_world_graph skips first element in AddBatch when using multiple index threads #533

@jaivia

Description

@jaivia

for (size_t id = 1; id < prm.batchData_.size(); ++id) {

The for loop in the indexing thread makes incorrect assumption that first element in batch will always be handled by the primer functions. First element is only added if ELList is empty, thus all subsequent AddBatch calls skip the first element. Issue only happens when using multiple threads.

Did local changes to fix:

  • Add size_t batch_start_index prop to Thread params.
  • Init batch_start_index with start_add on primer function
  • Change for loop in thread to init with batch_start_index rather than 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0