Write a commit record to disk for the specified tid, and force the log to disk. @param tid The committing transaction.
(TransactionId tid)
| 177 | @param tid The committing transaction. |
| 178 | */ |
| 179 | public synchronized void logCommit(TransactionId tid) throws IOException { |
| 180 | preAppend(); |
| 181 | Debug.log("COMMIT " + tid.getId()); |
| 182 | //should we verify that this is a live transaction? |
| 183 | |
| 184 | raf.writeInt(COMMIT_RECORD); |
| 185 | raf.writeLong(tid.getId()); |
| 186 | raf.writeLong(currentOffset); |
| 187 | currentOffset = raf.getFilePointer(); |
| 188 | force(); |
| 189 | tidToFirstLogRecord.remove(tid.getId()); |
| 190 | } |
| 191 | |
| 192 | /** Write an UPDATE record to disk for the specified tid and page |
| 193 | (with provided before and after images.) |