1
0
Fork 0
mirror of https://github.com/chrislusf/seaweedfs synced 2024-05-05 02:50:11 +02:00

Fixes race with unlocked setter. (#5532)

This commit is contained in:
M@ 2024-04-25 02:18:28 -04:00 committed by GitHub
parent 607927da60
commit 855607c536
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,7 +72,9 @@ func (r *LockRing) SetSnapshot(servers []pb.ServerAddress) {
return servers[i] < servers[j]
})
r.Lock()
r.lastUpdateTime = time.Now()
r.Unlock()
r.addOneSnapshot(servers)