An error occurred while fetching folder content.
Fix unnecessary pinning in `btreefile.LeafPage`
Michael A. Goulet authored
We pin an underlying page N times too many whenever we instantiate a new
LeafPage class, due to the constructor of the BTreeFilePageTuple. What we
want is a tuple that acts like a _weak_ reference to the underlying
page, and only make it a _strong_ reference whenever this tuple escapes
the scope of the btree-internal classes (e.g. in `BTreeFile.addTuple`).

Right now, I just add an `unpin()` call in the constructor of the Tuple,
and then pin it whenever I know that it escapes the scope of the btree
package. Maybe there's a more graceful way of doing it. I have no idea.
21aed89e
Name Last commit Last update