Closed GuptaManan100 closed 1 week ago
Hello reviewers! :wave: Please follow this checklist when reviewing this Pull Request.
release notes (needs details)
label if users need to know about this change.-
), and have a clear help text.Jobs
should be named in order to mark it as required
.required
, the maintainer team must be notified._vt
tables and RPCs need to be backward compatible.vtctl
command output order should be stable and awk
-able.Attention: Patch coverage is 89.18919%
with 4 lines
in your changes missing coverage. Please review.
Project coverage is 67.39%. Comparing base (
c72bbdc
) to head (3901fc2
). Report is 2 commits behind head on main.
Files with missing lines | Patch % | Lines |
---|---|---|
go/vt/vttablet/tabletserver/health_streamer.go | 82.60% | 4 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
For some historical context, when the original code was written, defer
still had a somewhat significant penalty, hence the lack of defer mu.Unlock
. That was resolved in upstream Go in v1.14.
Description
This PR fixes the deadlocks in messager and health streamer as pointed out in #17229.
The fix to the deadlock for both the cases was to use two different mutexes. One that only protects against calling setup functions like
Open
andClose
concurrently, and the other one that actually protects the fields. This helps in removing the deadlock since the function that runs on a broadcast from the schema engine would acquire a different mutex than the call to Close.Related Issue(s)
Checklist
Deployment Notes