Remove the specified tuple from the buffer pool. Will acquire a write lock on the page the tuple is removed from and any other pages that are updated. May block if the lock(s) cannot be acquired. Marks any pages that were dirtied by the operation as dirty by calling their markDirty bit, and adds ve
(TransactionId tid, Tuple t)
| 216 | * @param t the tuple to delete |
| 217 | */ |
| 218 | public void deleteTuple(TransactionId tid, Tuple t) |
| 219 | throws DbException, IOException, TransactionAbortedException { |
| 220 | // some code goes here |
| 221 | // not necessary for lab1 |
| 222 | DbFile dbFile = Database.getCatalog().getDatabaseFile(t.getRecordId().getPageId().getTableId()); |
| 223 | List<Page> pages = dbFile.deleteTuple(tid,t); |
| 224 | for(Page page: pages){ |
| 225 | page.markDirty(true,tid); |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | /** |
| 230 | * Flush all dirty pages to disk. |
nothing calls this directly
no test coverage detected