Update the parent pointer of every child of the given page so that it correctly points to the parent @param tid - the transaction id @param dirtypages - the list of dirty pages which should be updated with all new dirty pages @param page - the parent page @see #updateParentPointer(TransactionId, Ma
(TransactionId tid, Map<PageId, Page> dirtypages, BTreeInternalPage page)
| 472 | * @throws TransactionAbortedException |
| 473 | */ |
| 474 | private void updateParentPointers(TransactionId tid, Map<PageId, Page> dirtypages, BTreeInternalPage page) |
| 475 | throws DbException, TransactionAbortedException{ |
| 476 | Iterator<BTreeEntry> it = page.iterator(); |
| 477 | BTreePageId pid = page.getId(); |
| 478 | BTreeEntry e = null; |
| 479 | while(it.hasNext()) { |
| 480 | e = it.next(); |
| 481 | updateParentPointer(tid, dirtypages, pid, e.getLeftChild()); |
| 482 | } |
| 483 | if(e != null) { |
| 484 | updateParentPointer(tid, dirtypages, pid, e.getRightChild()); |
| 485 | } |
| 486 | } |
| 487 | |
| 488 | /** |
| 489 | * Method to encapsulate the process of locking/fetching a page. First the method checks the local |
no test coverage detected