MCPcopy Create free account
hub / github.com/ByConity/ByConity / clearData

Method clearData

src/Databases/MySQL/MaterializedMySQLSyncThreadManager.cpp:296–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296void MaterializedMySQLSyncThreadManager::clearData()
297{
298 /// persist CloudMaterializedMySQLLog only when manager (sync_type == Syncing)
299 if (sync_type == MaterializedMySQLSyncType::Syncing)
300 {
301 if (auto materialize_mysql_log = getContext()->getCloudMaterializedMySQLLog())
302 {
303 auto current_log = MaterializedMySQL::createMaterializeMySQLLog(MaterializedMySQLLogElement::SYNC_MANAGER, MaterializedMySQLLogElement::MANUAL_STOP_SYNC, storage_id.database_name);
304 materialize_mysql_log->add(current_log);
305 }
306 }
307 setSyncType(MaterializedMySQLSyncType::ManualStopSync);
308 /// Stop resync table task
309 resync_table_quit = true;
310 resync_table_task->deactivate();
311 /// Second: stop all sync threads on worker side
312 std::lock_guard lock(status_info_mutex);
313 stopSyncThreads();
314 threads_info.clear();
315 initialized = false;
316}
317
318void MaterializedMySQLSyncThreadManager::drop()
319{

Callers

nothing calls this directly

Calls 5

deactivateMethod · 0.80
addMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected