mirror of
https://github.com/cubefs/cubefs.git
synced 2026-08-02 02:00:56 +00:00
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:
parent
96f8c21399
commit
c3a505fb1e
@ -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)
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user