Called on every log record (each one of which is a WriteBatch) found in a kDescriptorFile.
| 126 | // Called on every log record (each one of which is a WriteBatch) |
| 127 | // found in a kDescriptorFile. |
| 128 | static void VersionEditPrinter(uint64_t pos, Slice record, WritableFile* dst) { |
| 129 | std::string r = "--- offset "; |
| 130 | AppendNumberTo(&r, pos); |
| 131 | r += "; "; |
| 132 | VersionEdit edit; |
| 133 | Status s = edit.DecodeFrom(record); |
| 134 | if (!s.ok()) { |
| 135 | r += s.ToString(); |
| 136 | r.push_back('\n'); |
| 137 | } else { |
| 138 | r += edit.DebugString(); |
| 139 | } |
| 140 | dst->Append(r); |
| 141 | } |
| 142 | |
| 143 | Status DumpDescriptor(Env* env, const std::string& fname, WritableFile* dst) { |
| 144 | return PrintLogContents(env, fname, VersionEditPrinter, dst); |
nothing calls this directly
no test coverage detected