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

Method tryLockForCurrentQueryTimedWithContext

src/Storages/StorageJoin.cpp:101–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

99}
100
101RWLockImpl::LockHolder StorageJoin::tryLockForCurrentQueryTimedWithContext(const RWLock & lock, RWLockImpl::Type type, ContextPtr context)
102{
103 const String query_id = context ? context->getInitialQueryId() : RWLockImpl::NO_QUERY;
104 const std::chrono::milliseconds acquire_timeout
105 = context ? std::chrono::milliseconds(context->getSettingsRef()[Setting::lock_acquire_timeout].totalMilliseconds()) : std::chrono::seconds(DBMS_DEFAULT_LOCK_ACQUIRE_TIMEOUT_SEC);
106 return lock->getLock(type, query_id, acquire_timeout, false);
107}
108
109SinkToStoragePtr StorageJoin::write(const ASTPtr & query, const StorageMetadataPtr & metadata_snapshot, ContextPtr context, bool /*async_insert*/)
110{

Callers

nothing calls this directly

Calls 3

getInitialQueryIdMethod · 0.80
totalMillisecondsMethod · 0.45
getLockMethod · 0.45

Tested by

no test coverage detected