clonedBTree.close();
}
protected PageNumber store(Key key, byte[] value, short mode, PageNumber root, KernelContext kContext) throws ChaiDBException {
PageNumber rootPgNumber;
this.getBTreeSpec().setModified(true);
//lock root page
BTreePage rootPage = new BTreePage(id, root, btreeSpec, buffer);
if (rootPage.getPage() == null) {
rootPage = BTreePage.newPage(btreeSpec, buffer, kContext);
rootPage.setLeaf();
rootPage.setPrevPage(new PageNumber(id, 0, 0)); // root
// insert
rootPage.insert(key, value, mode, kContext);
buffer.releasePage(id, rootPage.pageNumber, true);
rootPgNumber = rootPage.pageNumber;