-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
[3.5] server/auth: protect rangePermCache with a RW lock #14227
Conversation
server/auth/range_perm_cache.go
Outdated
@@ -118,21 +121,42 @@ func (as *authStore) isRangeOpPermitted(tx backend.ReadTx, userName string, key, | |||
return false | |||
} | |||
as.rangePermCache[userName] = perms |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems it follows different logic as the PR on main branch. The PR (13954) on main branch doesn't update the rangePermCache
at all in isRangeOpPermitted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for checking, I missed it... updated this logic in the latest version of this PR, could you check again?
380a5d6
to
cb4cb90
Compare
Overall looks good to me, the only minor comment is it would be better to use |
@ahrtr ah thanks for pointing out, I'll update |
Signed-off-by: Hitoshi Mitake <[email protected]>
cb4cb90
to
e15c005
Compare
@ahrtr Updated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you @mitake
Not sure if this is the same problem (let me know if not). We're running 9d7e108 and still seeing the follow errors when going from 3.4.18 -> 3.5.4. Thanks.
|
@vivekpatani Could you share a way to reproduce? Also, does the issue happen deterministically on your env? This PR is related to a very rare non deterministic bug. If you can easily reproduce, I think it's a different problem. |
@mitake @ahrtr here's a simple way to reproduce the issue, I think it's related to watches
Please let me know if you need more data/help. |
This PR backports #13954 to release-3.5.
Updating CHANGELOG-3.5.md in #14228
cc @ahrtr @ptabor