From 26924032e18ce3253eb5a291812ac99db8884dfc Mon Sep 17 00:00:00 2001 From: AlexCXC <1223408988@qq.com> Date: Thu, 23 Jan 2025 17:57:29 +0800 Subject: [PATCH 1/3] add logs for sync-cds and force-sync-cds about syncing warning --- dtable_events/dtable_io/task_manager.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dtable_events/dtable_io/task_manager.py b/dtable_events/dtable_io/task_manager.py index ef129b49..e1bf0962 100644 --- a/dtable_events/dtable_io/task_manager.py +++ b/dtable_events/dtable_io/task_manager.py @@ -357,11 +357,14 @@ def add_sync_common_dataset_task(self, context): """ return: task_id -> str or None, error_type -> str or None """ + from dtable_events.dtable_io import dtable_io_logger from dtable_events.dtable_io.import_sync_common_dataset import sync_common_dataset dataset_sync_id = context.get('sync_id') with self.dataset_sync_ids_lock: if self.is_syncing(dataset_sync_id): + dtable_io_logger.warning('sync_id: %s dst_dtable_uuid: %s dst_table_id: %s is syncing, current syncing ids: %s', + dataset_sync_id, context.get('dst_dtable_uuid'), context.get('dst_table_id'), self.dataset_sync_ids) return None, 'syncing' self.add_dataset_sync(dataset_sync_id) @@ -378,11 +381,13 @@ def add_force_sync_common_dataset_task(self, context): """ return: task_id -> str or None, error_type -> str or None """ + from dtable_events.dtable_io import dtable_io_logger from dtable_events.dtable_io.import_sync_common_dataset import force_sync_common_dataset dataset_id = context.get('dataset_id') with self.force_sync_dataset_ids_lock: if self.is_dataset_force_syncing(dataset_id): + dtable_io_logger.warning('dataset: %s is syncing, current syncing datasets: %s', dataset_id, self.force_sync_dataset_ids) return None, 'syncing' self.force_sync_dataset_ids.add(dataset_id) From 9a1e47323c10f4c9f7e654fe21f6deb7c9bbf671 Mon Sep 17 00:00:00 2001 From: AlexCXC <1223408988@qq.com> Date: Thu, 23 Jan 2025 18:20:33 +0800 Subject: [PATCH 2/3] update log --- dtable_events/dtable_io/task_manager.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dtable_events/dtable_io/task_manager.py b/dtable_events/dtable_io/task_manager.py index e1bf0962..3d7e3f47 100644 --- a/dtable_events/dtable_io/task_manager.py +++ b/dtable_events/dtable_io/task_manager.py @@ -387,7 +387,8 @@ def add_force_sync_common_dataset_task(self, context): dataset_id = context.get('dataset_id') with self.force_sync_dataset_ids_lock: if self.is_dataset_force_syncing(dataset_id): - dtable_io_logger.warning('dataset: %s is syncing, current syncing datasets: %s', dataset_id, self.force_sync_dataset_ids) + dtable_io_logger.warning('dataset: %s is syncing, src_dtable_uuid: %s, dst_dtable_uuids: %s, current syncing datasets: %s', + dataset_id, context.get('src_dtable_uuid'), context.get('dst_dtable_uuids'), self.force_sync_dataset_ids) return None, 'syncing' self.force_sync_dataset_ids.add(dataset_id) From 2d550539bb18d28b4e2b3934803c71b90647a80e Mon Sep 17 00:00:00 2001 From: AlexCXC <1223408988@qq.com> Date: Thu, 23 Jan 2025 18:30:12 +0800 Subject: [PATCH 3/3] update --- dtable_events/dtable_io/task_manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dtable_events/dtable_io/task_manager.py b/dtable_events/dtable_io/task_manager.py index 3d7e3f47..1d6f17b6 100644 --- a/dtable_events/dtable_io/task_manager.py +++ b/dtable_events/dtable_io/task_manager.py @@ -363,8 +363,8 @@ def add_sync_common_dataset_task(self, context): dataset_sync_id = context.get('sync_id') with self.dataset_sync_ids_lock: if self.is_syncing(dataset_sync_id): - dtable_io_logger.warning('sync_id: %s dst_dtable_uuid: %s dst_table_id: %s is syncing, current syncing ids: %s', - dataset_sync_id, context.get('dst_dtable_uuid'), context.get('dst_table_id'), self.dataset_sync_ids) + dtable_io_logger.warning('sync_id %s is syncing, current syncing ids: %s', + dataset_sync_id, self.dataset_sync_ids) return None, 'syncing' self.add_dataset_sync(dataset_sync_id) @@ -387,8 +387,8 @@ def add_force_sync_common_dataset_task(self, context): dataset_id = context.get('dataset_id') with self.force_sync_dataset_ids_lock: if self.is_dataset_force_syncing(dataset_id): - dtable_io_logger.warning('dataset: %s is syncing, src_dtable_uuid: %s, dst_dtable_uuids: %s, current syncing datasets: %s', - dataset_id, context.get('src_dtable_uuid'), context.get('dst_dtable_uuids'), self.force_sync_dataset_ids) + dtable_io_logger.warning('dataset %s is syncing, current syncing datasets: %s', + dataset_id, self.force_sync_dataset_ids) return None, 'syncing' self.force_sync_dataset_ids.add(dataset_id)