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

Method processServerQuery

src/Client/BuzzHouse/Generator/FuzzConfig.cpp:520–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

518}
519
520bool FuzzConfig::processServerQuery(const bool outlog, const String & query)
521{
522 bool res = true;
523 bool caught_exception = false;
524
525 try
526 {
527 if (outlog)
528 {
529 outf << query << std::endl;
530 }
531 res &= this->cb->processTextAsSingleQuery(query);
532 }
533 catch (const std::exception &)
534 {
535 LOG_ERROR(log, "Error on processing query '{}': {}\n", query, DB::getCurrentExceptionMessage(false));
536 res = false;
537 caught_exception = true;
538 }
539 if (!res)
540 {
541 if (!caught_exception)
542 LOG_ERROR(log, "Unknown error on processing query '{}'\n", query);
543 if (!this->cb->tryToReconnect(max_reconnection_attempts, time_to_sleep_between_reconnects))
544 throw DB::Exception(DB::ErrorCodes::NETWORK_ERROR, "Couldn't not reconnect to the server");
545 }
546 return res;
547}
548
549template <typename T, typename ParseFunc>
550void FuzzConfig::loadServerSettings(std::vector<T> & out, const String & desc, const String & query, ParseFunc parse)

Callers 2

replicateSettingsMethod · 0.80

Calls 4

ExceptionClass · 0.50
tryToReconnectMethod · 0.45

Tested by

no test coverage detected