From d125c68275f6d3c64290e95b92274b1eedabcabc Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Thu, 19 Nov 2020 14:12:43 -0700 Subject: [PATCH] Fix estimated page size calculation to include index padding. --- rbf/cursor.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rbf/cursor.go b/rbf/cursor.go index 8271c894c..9da421995 100644 --- a/rbf/cursor.go +++ b/rbf/cursor.go @@ -367,8 +367,9 @@ func (c *Cursor) putLeafCell(in leafCell) (err error) { } // Use an optimized routine to insert the leaf cell if we won't overflow. - // We pad the estimate with 8 bytes because we do 8-byte alignment of cells. - if newEstPageSize+8 <= PageSize { + // We pad the estimate with 16 bytes because we do 8-byte alignment of + // both the cell and the index. + if newEstPageSize+16 <= PageSize { return c.putLeafCellFast(in, isInsert) }