mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Better function name and comment
This commit is contained in:
parent
82c5ff6e9b
commit
1d8cab3379
@ -865,7 +865,7 @@ void CacheDictionary::update(BunchUpdateUnit & bunch_update_unit) const
|
||||
{
|
||||
try
|
||||
{
|
||||
auto current_source_ptr = getDictionarySourceOrUpdate();
|
||||
auto current_source_ptr = getSourceAndUpdateIfNeeded();
|
||||
|
||||
Stopwatch watch;
|
||||
|
||||
|
@ -92,7 +92,7 @@ public:
|
||||
database,
|
||||
name,
|
||||
dict_struct,
|
||||
getDictionarySourceOrUpdate()->clone(),
|
||||
getSourceAndUpdateIfNeeded()->clone(),
|
||||
dict_lifetime,
|
||||
strict_max_lifetime_seconds,
|
||||
size,
|
||||
@ -295,7 +295,7 @@ private:
|
||||
/// MultiVersion is not used here because it works with constant pointers.
|
||||
/// For some reason almost all methods in IDictionarySource interface are
|
||||
/// not constant.
|
||||
SharedDictionarySourcePtr getDictionarySourceOrUpdate() const
|
||||
SharedDictionarySourcePtr getSourceAndUpdateIfNeeded() const
|
||||
{
|
||||
std::lock_guard lock(source_mutex);
|
||||
if (error_count)
|
||||
@ -326,7 +326,7 @@ private:
|
||||
const std::string full_name;
|
||||
const DictionaryStructure dict_struct;
|
||||
|
||||
/// Dictionary source should be used without mutex
|
||||
/// Dictionary source should be used with mutex
|
||||
mutable std::mutex source_mutex;
|
||||
mutable SharedDictionarySourcePtr source_ptr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user