We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug kvstore/cache_kv.go中很多方法没有使用defer的方式来释放锁,可能会有死锁的风险
To Reproduce 如下代码可能 在获取锁之后若有执行异常则会崩掉,则全局锁则无法释放,造成死锁。 https://github.com/apache/servicecomb-service-center/blob/ce7afe04f5bcad594bede6204a37443bfa9c0a00/datasource/etcd/state/kvstore/cache_kv.go#L45C6-L45C6
servicecomb-service-center/datasource/etcd/state/kvstore/cache_kv.go
Line 55 in ce7afe0
Line 62 in ce7afe0
Line 69 in ce7afe0
Line 76 in ce7afe0
Line 82 in ce7afe0
Line 95 in ce7afe0
Expected behavior 此处预期获取锁之后的执行逻辑无异常,及时把锁释放掉。 为了增强可靠性,可以通过defer的方式来释放锁。
Platform And Runtime (please complete the following information):
Platform
Runtime
Additional context Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
kvstore/cache_kv.go中很多方法没有使用defer的方式来释放锁,可能会有死锁的风险
To Reproduce
如下代码可能 在获取锁之后若有执行异常则会崩掉,则全局锁则无法释放,造成死锁。
https://github.com/apache/servicecomb-service-center/blob/ce7afe04f5bcad594bede6204a37443bfa9c0a00/datasource/etcd/state/kvstore/cache_kv.go#L45C6-L45C6
servicecomb-service-center/datasource/etcd/state/kvstore/cache_kv.go
Line 55 in ce7afe0
servicecomb-service-center/datasource/etcd/state/kvstore/cache_kv.go
Line 62 in ce7afe0
servicecomb-service-center/datasource/etcd/state/kvstore/cache_kv.go
Line 69 in ce7afe0
servicecomb-service-center/datasource/etcd/state/kvstore/cache_kv.go
Line 76 in ce7afe0
servicecomb-service-center/datasource/etcd/state/kvstore/cache_kv.go
Line 82 in ce7afe0
servicecomb-service-center/datasource/etcd/state/kvstore/cache_kv.go
Line 95 in ce7afe0
Expected behavior
此处预期获取锁之后的执行逻辑无异常,及时把锁释放掉。
为了增强可靠性,可以通过defer的方式来释放锁。
Platform And Runtime (please complete the following information):
Platform
Runtime
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: