File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/Storages/MaterializedView Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,8 @@ void RefreshTask::checkAlterIsPossible(const DB::ASTRefreshStrategy & new_strate
216216
217217void RefreshTask::alterRefreshParams (const DB::ASTRefreshStrategy & new_strategy)
218218{
219+ StorageID view_storage_id = StorageID::createEmpty ();
220+
219221 {
220222 std::lock_guard guard (mutex);
221223
@@ -235,9 +237,17 @@ void RefreshTask::alterRefreshParams(const DB::ASTRefreshStrategy & new_strategy
235237 refresh_settings = {};
236238 if (new_strategy.settings != nullptr )
237239 refresh_settings.applyChanges (new_strategy.settings ->changes );
240+
241+ if (view)
242+ view_storage_id = view->getStorageID ();
238243 }
244+
239245 // / In case refresh period changed.
240- view->getContext ()->getRefreshSet ().notifyDependents (view->getStorageID ());
246+ if (view_storage_id)
247+ {
248+ const auto & refresh_set = Context::getGlobalContextInstance ()->getRefreshSet ();
249+ refresh_set.notifyDependents (view_storage_id);
250+ }
241251}
242252
243253RefreshTask::Info RefreshTask::getInfo () const
You can’t perform that action at this time.
0 commit comments