mirror of
https://github.com/octoleo/restic.git
synced 2024-11-25 14:17:42 +00:00
index: fix blocklist size
This commit is contained in:
parent
9a7056a479
commit
ac1dfc99bb
@ -204,14 +204,14 @@ func (h *hashedArrayTree) grow() {
|
||||
idx, subIdx := h.index(h.size)
|
||||
if int(idx) == len(h.blockList) {
|
||||
// blockList is too small -> double list and block size
|
||||
oldBlocks := h.blockList
|
||||
h.blockList = make([][]indexEntry, h.blockSize)
|
||||
|
||||
h.blockSize *= 2
|
||||
h.mask = h.mask*2 + 1
|
||||
h.maskShift++
|
||||
idx = idx / 2
|
||||
|
||||
oldBlocks := h.blockList
|
||||
h.blockList = make([][]indexEntry, h.blockSize)
|
||||
|
||||
// pairwise merging of blocks
|
||||
for i := 0; i < len(oldBlocks); i += 2 {
|
||||
block := make([]indexEntry, 0, h.blockSize)
|
||||
|
Loading…
Reference in New Issue
Block a user