Skip to content

Commit

Permalink
Merge pull request #127 from LiilyZhang/issue3308
Browse files Browse the repository at this point in the history
Issue 3308 - Bug: AgentAutoUpgrade in middle of MMS object download t…
  • Loading branch information
LiilyZhang authored Jun 16, 2022
2 parents 17d24c9 + 291de88 commit 8a9b681
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions core/communications/httpCommunication.go
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,7 @@ func (communication *HTTP) GetDataByChunk(metaData common.MetaData, offset int64
return nil
}

// update ESS notification to "getdata"
if err := updateGetDataNotification(metaData, metaData.OriginType, metaData.OriginID, offset); err != nil {
common.ObjectLocks.Unlock(lockIndex)
return err
Expand Down
5 changes: 3 additions & 2 deletions core/communications/notificationHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/binary"
"fmt"
"io"
"math"
"os"
"sort"
"sync"
Expand Down Expand Up @@ -1848,7 +1849,7 @@ func getOffsetsForResendFromScratch(notification common.Notification, metaData c
return offsets
}

maxInflightChunks := 1
maxInflightChunks := math.MaxInt32
if protocol == common.MQTTProtocol {
maxInflightChunks = common.Configuration.MaxInflightChunks
}
Expand All @@ -1861,7 +1862,7 @@ func getOffsetsForResendFromScratch(notification common.Notification, metaData c
return offsets
}

if metaData.ChunkSize <= 0 || metaData.ObjectSize <= 0 {
if metaData.ChunkSize <= 0 || metaData.ObjectSize <= 0 || !common.Configuration.EnableDataChunk {
offsets = append(offsets, 0)
} else {
var offset int64
Expand Down

0 comments on commit 8a9b681

Please sign in to comment.