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 deadlock by avoiding recursive locking in meta_class #4959

Conversation

reyreaud-l
Copy link
Contributor

@reyreaud-l reyreaud-l commented May 17, 2024

What's being changed:

  • Avoid recursive locking by reading directly the multi tenancy config instead of calling MultiTenancyConfig that will re-acquire the lock.
  • Had a pass run with https://github.com/sasha-s/go-deadlock to find others -> all clear

Original fix by @etiennedi, re-opened to have a fix that is more in-line with the way the code base usually fix these problems (not a new function but instead reading the needed data while holding the lock).

Review checklist

Signed-off-by: Loic Reyreaud <loic@weaviate.io>
@reyreaud-l reyreaud-l force-pushed the 4957-raft-deadlock-on-race-condition-on-multi-tenancy-config-read branch from e1faeb3 to 0ce40c9 Compare May 17, 2024 07:02
Copy link

sonarcloud bot commented May 17, 2024

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@reyreaud-l reyreaud-l changed the title 4957 raft deadlock on race condition on multi tenancy config read fix deadlock by avoiding recursive locking in meta_class May 17, 2024
@reyreaud-l reyreaud-l linked an issue May 17, 2024 that may be closed by this pull request
@reyreaud-l reyreaud-l merged commit de23d7b into stable/v1.25 May 17, 2024
42 checks passed
@reyreaud-l reyreaud-l deleted the 4957-raft-deadlock-on-race-condition-on-multi-tenancy-config-read branch May 17, 2024 08:07
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.

RAFT Deadlock on race condition on multi tenancy config read
3 participants