| 1312 | } |
| 1313 | |
| 1314 | static 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 | |
| 1323 | using StorageFilePtr = std::shared_ptr<StorageFile>; |
| 1324 |
no test coverage detected