Skip to content

Commit

Permalink
Performance optimisation: skipping checkLeasesAndEnqueueAnyStale if the
Browse files Browse the repository at this point in the history
setting SettingNameRWXVolumeFastFailover is not enabled

Signed-off-by: Phan Le <phan.le@suse.com>
(cherry picked from commit 8cab966)
  • Loading branch information
PhanLe1010 authored and derekbit committed Jul 27, 2024
1 parent e4d8f27 commit 3dc6ecc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions controller/share_manager_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ func isShareManagerPod(obj interface{}) bool {
}

func (c *ShareManagerController) checkLeasesAndEnqueueAnyStale() error {
enabled, err := c.ds.GetSettingAsBool(types.SettingNameRWXVolumeFastFailover)
if err != nil {
return err
}
if !enabled {
return nil
}

sms, err := c.ds.ListShareManagersRO()
if err != nil {
return err
Expand Down

0 comments on commit 3dc6ecc

Please sign in to comment.