Skip to content

Conversation

@WangZixin67
Copy link

@WangZixin67 WangZixin67 commented Dec 11, 2024

Hi,
I hope this message finds you well.

I'm raising this PR to fix negative wait group value when DBSCAN is utilising multiple threads.

Issue:
The division used to calculate c.f takes the floor of the integer value, which may result in the "nearest" function creating more rangeJobs than the number of workers. Consequently, this causes more calls to WaitGroup.Done than WaitGroup.Add, leading to a negative wait group value.

Solution:
Modify the calculation to use the ceiling of the integer value for c.f.

Thank you for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant