mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
Fix estimated page size calculation to include index padding.
This commit is contained in:
parent
33334511c4
commit
d125c68275
1 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue