Skip to content

Commit

Permalink
Fixed slicing of chunk assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
tizbac committed Dec 4, 2023
1 parent b52d214 commit 652c12e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func main() {
}

//Avoid incurring in request entity too large
for k := 0; k < len(PXAR_CHK.assignments)+128; k += 128 {
for k := 0; k < len(PXAR_CHK.assignments); k += 128 {
k2 := k + 128
if k2 > len(PXAR_CHK.assignments) {
k2 = len(PXAR_CHK.assignments)
Expand All @@ -274,7 +274,7 @@ func main() {

client.CloseDynamicIndex(PXAR_CHK.wrid, hex.EncodeToString(PXAR_CHK.chunkdigests.Sum(nil)), PXAR_CHK.pos, PXAR_CHK.chunkcount)

for k := 0; k < len(PCAT1_CHK.assignments)+128; k += 128 {
for k := 0; k < len(PCAT1_CHK.assignments); k += 128 {
k2 := k + 128
if k2 > len(PCAT1_CHK.assignments) {
k2 = len(PCAT1_CHK.assignments)
Expand Down

0 comments on commit 652c12e

Please sign in to comment.