MCPcopy Create free account
hub / github.com/1345414527/MIT6.830 / preAppend

Method preAppend

src/java/simpledb/storage/LogFile.java:129–139  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127 // DB wants to do recovery, we're sure now -- it didn't. So truncate
128 // the log.
129 void preAppend() throws IOException {
130 totalRecords++;
131 if(recoveryUndecided){
132 recoveryUndecided = false;
133 raf.seek(0);
134 raf.setLength(0);
135 raf.writeLong(NO_CHECKPOINT_ID);
136 raf.seek(raf.length());
137 currentOffset = raf.getFilePointer();
138 }
139 }
140
141 public synchronized int getTotalRecords() {
142 return totalRecords;

Callers 7

logAbortMethod · 0.95
logCommitMethod · 0.95
logWriteMethod · 0.95
logXactionBeginMethod · 0.95
logCheckpointMethod · 0.95
logTruncateMethod · 0.95
rollbackMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected