From 41990067d7c226e5c0b889619a2bfb3bcf483cf7 Mon Sep 17 00:00:00 2001 From: Kosuke Morimoto Date: Wed, 27 Sep 2023 16:13:38 +0900 Subject: [PATCH] fix --- internal/core/algorithm/ngt/ngt.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/algorithm/ngt/ngt.go b/internal/core/algorithm/ngt/ngt.go index cb36f2b3d7..14bb95111d 100644 --- a/internal/core/algorithm/ngt/ngt.go +++ b/internal/core/algorithm/ngt/ngt.go @@ -680,10 +680,10 @@ func (n *ngt) Remove(id uint) error { ret := func(id uint) int { return 1 }(id) + n.unlock(true) if ret == ErrorCode { return errors.Errorf("remove error") } - n.unlock(true) n.cnt.Add(^uint64(0))