Skip to content

Commit

Permalink
[build][enhance] decrease exponenital ebs
Browse files Browse the repository at this point in the history
  • Loading branch information
cuongpiger committed Jul 1, 2024
1 parent ba5ac94 commit 75a4bd6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pkg/driver/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ func (s *controllerService) ControllerGetCapabilities(ctx lctx.Context, req *lcs
}

func (s *controllerService) ControllerExpandVolume(_ lctx.Context, preq *lcsi.ControllerExpandVolumeRequest) (*lcsi.ControllerExpandVolumeResponse, error) {
llog.V(4).InfoS("ControllerExpandVolume: called", "preq", *preq)
llog.V(4).InfoS("[INFO] - ControllerExpandVolume: Called", "request", *preq)

volumeID := preq.GetVolumeId()
if volumeID == "" {
Expand All @@ -480,9 +480,13 @@ func (s *controllerService) ControllerExpandVolume(_ lctx.Context, preq *lcsi.Co

// check if a request is already in-flight
if ok := s.inFlight.Insert(volumeID); !ok {
llog.InfoS("[INFO] - ControllerExpandVolume: Operation is already in-flight", "volumeID", volumeID)
return nil, ErrOperationAlreadyExists(volumeID)
}
defer s.inFlight.Delete(volumeID)
defer func() {
llog.InfoS("[INFO] - ControllerExpandVolume: Operation completed", "volumeID", volumeID)
s.inFlight.Delete(volumeID)
}()

capRange := preq.GetCapacityRange()
if capRange == nil {
Expand Down

0 comments on commit 75a4bd6

Please sign in to comment.