| 84 | } |
| 85 | |
| 86 | void Transaction::publishCommit() { |
| 87 | if (commitTS == common::INVALID_TRANSACTION) { |
| 88 | throw common::RuntimeException{"Cannot publish commit with an invalid commit timestamp."}; |
| 89 | } |
| 90 | localStorage->commit(); |
| 91 | undoBuffer->commit(commitTS); |
| 92 | if (hasCatalogChanges) { |
| 93 | Catalog::Get(*clientContext)->incrementVersion(); |
| 94 | hasCatalogChanges = false; |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | void Transaction::rollback(storage::WAL*) { |
| 99 | // Rolling back the local storage will free + evict all optimistically-allocated pages |