From 6d90f6540ff3813ab83810b788e661ca29436e22 Mon Sep 17 00:00:00 2001 From: wxing1292 Date: Fri, 4 Mar 2022 08:54:19 -0800 Subject: [PATCH] Fix potential shard deadlock issue (#2570) --- service/history/shard/context_impl.go | 1 + 1 file changed, 1 insertion(+) diff --git a/service/history/shard/context_impl.go b/service/history/shard/context_impl.go index b6ac2a2bf7d..1beed7d74b8 100644 --- a/service/history/shard/context_impl.go +++ b/service/history/shard/context_impl.go @@ -1472,6 +1472,7 @@ func (s *ContextImpl) loadShardMetadata(ownershipChanged *bool) error { s.rLock() if s.state >= contextStateStopping { + s.rUnlock() return errStoppingContext }