MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / checkUnsupportedVersion

Function checkUnsupportedVersion

src/Interpreters/loadMetadata.cpp:138–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138static void checkUnsupportedVersion(ContextMutablePtr, const String & database_name)
139{
140 auto default_db_disk = Context::getGlobalContextInstance()->getDatabaseDisk();
141 /// Produce better exception message
142 auto metadata_dir_path = DatabaseCatalog::getMetadataDirPath(database_name);
143 if (default_db_disk->existsDirectory(metadata_dir_path))
144 throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Data directory for {} database exists, but metadata file does not. "
145 "Probably you are trying to upgrade from version older than 20.7. "
146 "If so, you should upgrade through intermediate version.", database_name);
147}
148
149static void checkIncompleteOrdinaryToAtomicConversion(ContextPtr context, const std::map<String, fs::path> & databases)
150{

Callers 2

loadMetadataFunction · 0.85
loadSystemDatabaseImplFunction · 0.85

Calls 3

getDatabaseDiskMethod · 0.80
ExceptionClass · 0.70
existsDirectoryMethod · 0.45

Tested by

no test coverage detected