| 294 | } |
| 295 | |
| 296 | void 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 | |
| 318 | void MaterializedMySQLSyncThreadManager::drop() |
| 319 | { |
nothing calls this directly
no test coverage detected