diff options
| author | Ryan Russell <ryanrussell@users.noreply.github.com> | 2022-09-14 12:29:55 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-14 10:29:55 -0700 |
| commit | 72d8a9f9a8cdf2b55f45065753f2680c48694eda (patch) | |
| tree | 0d314d73e503ffe14669863a8001e3973ccfbdfb /weed/filer/filechunk_manifest.go | |
| parent | e22335ba78403585cb094aadb2ece2eba3610543 (diff) | |
| download | seaweedfs-72d8a9f9a8cdf2b55f45065753f2680c48694eda.tar.xz seaweedfs-72d8a9f9a8cdf2b55f45065753f2680c48694eda.zip | |
refactor(exclusive_locker): `Interval` readability batch of updates (#3668)
* refactor(filechunk_manifest): `localProcesed` -> `localProcessed`
Signed-off-by: Ryan Russell <git@ryanrussell.org>
* refactor: `saveChunkedFileIntevalToStorage` -> `saveChunkedFileIntervalToStorage`
Signed-off-by: Ryan Russell <git@ryanrussell.org>
* refactor: `SafeRenewInteval` -> `SafeRenewInterval`
Signed-off-by: Ryan Russell <git@ryanrussell.org>
* refactor: `InitLockInteval` -> `InitLockInterval`
Signed-off-by: Ryan Russell <git@ryanrussell.org>
* refactor: `RenewInteval` -> `RenewInterval`
Signed-off-by: Ryan Russell <git@ryanrussell.org>
Signed-off-by: Ryan Russell <git@ryanrussell.org>
Diffstat (limited to 'weed/filer/filechunk_manifest.go')
| -rw-r--r-- | weed/filer/filechunk_manifest.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/weed/filer/filechunk_manifest.go b/weed/filer/filechunk_manifest.go index 3a70e4fa3..8807e3e57 100644 --- a/weed/filer/filechunk_manifest.go +++ b/weed/filer/filechunk_manifest.go @@ -169,19 +169,19 @@ func retriedStreamFetchChunkData(writer io.Writer, urlStrings []string, cipherKe for waitTime := time.Second; waitTime < util.RetryWaitTime; waitTime += waitTime / 2 { for _, urlString := range urlStrings { - var localProcesed int + var localProcessed int shouldRetry, err = util.ReadUrlAsStream(urlString+"?readDeleted=true", cipherKey, isGzipped, isFullChunk, offset, size, func(data []byte) { - if totalWritten > localProcesed { - toBeSkipped := totalWritten - localProcesed + if totalWritten > localProcessed { + toBeSkipped := totalWritten - localProcessed if len(data) <= toBeSkipped { - localProcesed += len(data) + localProcessed += len(data) return // skip if already processed } data = data[toBeSkipped:] - localProcesed += toBeSkipped + localProcessed += toBeSkipped } writer.Write(data) - localProcesed += len(data) + localProcessed += len(data) totalWritten += len(data) }) if !shouldRetry { |
