Skip to content

Commit

Permalink
fix: golangci-lint error
Browse files Browse the repository at this point in the history
Signed-off-by: PoAn Yang <poan.yang@suse.com>
  • Loading branch information
FrankYang0529 authored and innobead committed May 31, 2024
1 parent a44861f commit 44093af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/sync/rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -912,13 +912,13 @@ func (s *SyncAgentServer) extraIncrementalFullRestoreOperations(restoreStatus *r

defer func() {
// try to clean up tmp files
if _, err := s.FileRemove(nil, &ptypes.FileRemoveRequest{
if _, err := s.FileRemove(context.TODO(), &ptypes.FileRemoveRequest{
FileName: tmpSnapshotDiskName,
}); err != nil {
logrus.WithError(err).Warnf("Failed to clean up delta file %s", tmpSnapshotDiskName)
}

if _, err := s.FileRemove(nil, &ptypes.FileRemoveRequest{
if _, err := s.FileRemove(context.TODO(), &ptypes.FileRemoveRequest{
FileName: tmpSnapshotDiskMetaName,
}); err != nil {
logrus.WithError(err).Warnf("Failed to clean up delta file %s", tmpSnapshotDiskMetaName)
Expand Down Expand Up @@ -947,7 +947,7 @@ func (s *SyncAgentServer) postIncrementalRestoreOperations(restoreStatus *replic
deltaFileName := restoreStatus.ToFileName
logrus.Info("Cleaning up incremental restore by Coalescing and removing the delta file")
defer func() {
if _, err := s.FileRemove(nil, &ptypes.FileRemoveRequest{
if _, err := s.FileRemove(context.TODO(), &ptypes.FileRemoveRequest{
FileName: deltaFileName,
}); err != nil {
logrus.WithError(err).Warnf("Failed to clean up delta file %s", deltaFileName)
Expand Down

0 comments on commit 44093af

Please sign in to comment.