Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(builder): put the upper limit on reallocation (dgraph-io#1748)
z.Allocator imposes an upper bound of 1GB on the size of the allocator. In builder, we double the allocation while reallocating to amortize the cost over the future allocations. Consider a scenario where the size of KV is 700MB. The size of the allocator would be 700MB. Now we want to finish the block, so we will need some bytes for the metadata. That can easily fit into the remaining 324MB. But we were earlier doing over-allocation that causes panic.
- Loading branch information