[#1110] node: Log maintenance stop only if it was enabled

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2024-04-27 14:48:36 +03:00
parent ef47d0b4f6
commit e25bddce62

View file

@ -381,8 +381,9 @@ func (c *cfg) startMaintenance() {
// stops node's maintenance. // stops node's maintenance.
func (c *internals) stopMaintenance() { func (c *internals) stopMaintenance() {
c.isMaintenance.Store(false) if c.isMaintenance.CompareAndSwap(true, false) {
c.log.Info(logs.FrostFSNodeStoppedLocalNodesMaintenance) c.log.Info(logs.FrostFSNodeStoppedLocalNodesMaintenance)
}
} }
// IsMaintenance checks if storage node is under maintenance. // IsMaintenance checks if storage node is under maintenance.