Skip to content

Commit

Permalink
rbd: log the watchers if there are too many
Browse files Browse the repository at this point in the history
Signed-off-by: Niels de Vos <ndevos@ibm.com>
  • Loading branch information
nixpanic committed Oct 31, 2024
1 parent b7a0b7b commit 0c48b27
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/rbd/rbd_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,10 @@ func (ri *rbdImage) isInUse() (bool, error) {
defaultWatchers += count
}

if len(watchers) > defaultWatchers {
log.ErrorLogMsg("too many watchers (%d > %d): %v", len(watchers), defaultWatchers, watchers)
}

return len(watchers) > defaultWatchers, nil
}

Expand Down

0 comments on commit 0c48b27

Please sign in to comment.