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

Function getLockTimeout

src/Storages/StorageFile.cpp:1314–1321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1312}
1313
1314static std::chrono::seconds getLockTimeout(const ContextPtr & context)
1315{
1316 const Settings & settings = context->getSettingsRef();
1317 Int64 lock_timeout = settings[Setting::lock_acquire_timeout].totalSeconds();
1318 if (settings[Setting::max_execution_time].totalSeconds() != 0 && settings[Setting::max_execution_time].totalSeconds() < lock_timeout)
1319 lock_timeout = settings[Setting::max_execution_time].totalSeconds();
1320 return std::chrono::seconds{lock_timeout};
1321}
1322
1323using StorageFilePtr = std::shared_ptr<StorageFile>;
1324

Callers 3

StorageFileSourceMethod · 0.70
beforeDestroyMethod · 0.70
writeMethod · 0.70

Calls 1

totalSecondsMethod · 0.45

Tested by

no test coverage detected