| 129 | } |
| 130 | |
| 131 | static Status ValidateAndOpenFile(const string& path, TupleTextFileReader& reader) { |
| 132 | if (!reader.Open().ok()) { |
| 133 | return Status(TErrorCode::TUPLE_CACHE_INCONSISTENCY, |
| 134 | Substitute("Failed to open file '$0'", path + DEBUG_TUPLE_CACHE_BAD_POSTFIX)); |
| 135 | } |
| 136 | |
| 137 | if (reader.GetFileSize() == TUPLE_TEXT_FILE_SIZE_ERROR) { |
| 138 | return Status(TErrorCode::TUPLE_CACHE_INCONSISTENCY, |
| 139 | Substitute("Size of file '$0' is invalid", path + DEBUG_TUPLE_CACHE_BAD_POSTFIX)); |
| 140 | } |
| 141 | return Status::OK(); |
| 142 | } |
| 143 | |
| 144 | static Status CacheFileCmp( |
| 145 | const std::string& path_a, const std::string& path_b, bool* passed) { |
no test coverage detected