fix(flashnode): avoid the cache not being cleaned up when the flashnode is removed.

close:#23003554

Signed-off-by: shuqiang-zheng <zhengshuqiang@oppo.com>
This commit is contained in:
shuqiang-zheng 2025-02-21 11:49:26 +08:00 committed by zhumingze1108
parent 96f8c21399
commit c3a505fb1e
2 changed files with 2 additions and 0 deletions

View File

@ -482,6 +482,7 @@ func (c *Cluster) setFlashNodeToUnused(addr string, flashGroupID uint64) (flashN
}
go func() {
time.Sleep(65 * time.Second)
arr := strings.SplitN(addr, ":", 2)
p, _ := strconv.ParseUint(arr[1], 10, 64)
addr = fmt.Sprintf("%s:%d", arr[0], p+1)

View File

@ -322,6 +322,7 @@ func (c *Cluster) removeFlashNode(flashNode *FlashNode) (err error) {
}
go func() {
time.Sleep(65 * time.Second)
arr := strings.SplitN(flashNode.Addr, ":", 2)
p, _ := strconv.ParseUint(arr[1], 10, 64)
addr := fmt.Sprintf("%s:%d", arr[0], p+1)