Skip to content

Commit

Permalink
fox accepted chunk size
Browse files Browse the repository at this point in the history
  • Loading branch information
Hitenjain14 committed Jul 29, 2023
1 parent a0ea3af commit 2847c53
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions dstorage/dstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type DStoreI interface {
GetAvailableSpace() int64
GetTotalSpace() int64
UpdateAllocationDetails() error
GetChunkWriteSize() int64
}

type DStorageService struct {
Expand Down Expand Up @@ -198,3 +199,7 @@ func GetDStorageService(allocationID, migrateTo, duplicateSuffix, workDir string
workDir: workDir,
}, nil
}

func (d *DStorageService) GetChunkWriteSize() int64 {
return d.allocation.GetChunkReadSize(d.encrypt)
}
2 changes: 1 addition & 1 deletion migration/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ func (m *Migration) processChunkDownload(ctx context.Context, sw *util.StreamWri
migrator.DownloadStart(downloadObjMeta)
offset := 0
chunkSize := CHUNKSIZE
acceptedChunkSize := sdk.DefaultChunkSize
acceptedChunkSize := int(m.zStore.GetChunkWriteSize())
defer close(sw.DataChan)
for {
select {
Expand Down

0 comments on commit 2847c53

Please sign in to comment.