From ff4eab2fc65e7757553095023ef04dbb53aa4628 Mon Sep 17 00:00:00 2001 From: Shijie Sheng Date: Thu, 16 Mar 2023 20:10:54 -0700 Subject: [PATCH] [history] more cautious in deciding domain state to make decisions on dropping queued tasks (#5164) What changed? When domain cache returned entity not found error, don't drop queued tasks to be more conservative. Why? In cases when the cache is dubious, we shouldn't drop the queued tasks. --- service/history/queue/task_allocator.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/service/history/queue/task_allocator.go b/service/history/queue/task_allocator.go index 124130e5055..422e8684712 100644 --- a/service/history/queue/task_allocator.go +++ b/service/history/queue/task_allocator.go @@ -196,10 +196,7 @@ func (t *taskAllocatorImpl) Unlock() { func isDomainNotRegistered(shard shard.Context, domainID string) (bool, error) { domainEntry, err := shard.GetDomainCache().GetDomainByID(domainID) if err != nil { - if _, ok := err.(*types.EntityNotExistsError); ok { - return true, nil - } - // unexpected error in finding a domain + // error in finding a domain return false, err } info := domainEntry.GetInfo()