Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(search): BuildIndex concurrency error #7035

Merged
merged 1 commit into from
Aug 21, 2024
Merged

fix(search): BuildIndex concurrency error #7035

merged 1 commit into from
Aug 21, 2024

Conversation

rammiah
Copy link
Contributor

@rammiah rammiah commented Aug 18, 2024

Check Running and store true is not an atomic operation, Quit and Running will be wrong variable when StopIndex and UpdateIndex called from http api or index auto_update enabled, leading to goroutine leak, alist log is full of index log:
image
屏幕截图 2024-08-18 120329

I removed Running variable, use Quit pointer to check BuildIndex is running, intruducing local running variable to notify WalkDir stop running, make sure only one goroutine is running BuildIndex.

@rammiah rammiah mentioned this pull request Aug 18, 2024
4 tasks
@xhofe xhofe requested a review from BoYanZh August 19, 2024 15:11
Copy link
Contributor

@BoYanZh BoYanZh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@xhofe xhofe merged commit 48f50a2 into AlistGo:main Aug 21, 2024
3 checks passed
Three-taile-dragon pushed a commit to loognsss/blist that referenced this pull request Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants