From 29580c585e10731f23ef7b5c8f3021f252988f39 Mon Sep 17 00:00:00 2001 From: weishaoxiong Date: Tue, 6 Aug 2024 11:32:22 +0800 Subject: [PATCH] fix: dfx Signed-off-by: weishaoxiong --- .../framework/include/store/general_value.h | 1 + .../service/cloud/cloud_service_impl.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/services/distributeddataservice/framework/include/store/general_value.h b/services/distributeddataservice/framework/include/store/general_value.h index 43d1fa256..3d905ea6b 100644 --- a/services/distributeddataservice/framework/include/store/general_value.h +++ b/services/distributeddataservice/framework/include/store/general_value.h @@ -37,6 +37,7 @@ enum SyncTriggerMode { MODE_ONLINE, MODE_UNLOCK, MODE_BROADCASTER, + MODE_CONSISTENCY, }; struct GenStatistic { diff --git a/services/distributeddataservice/service/cloud/cloud_service_impl.cpp b/services/distributeddataservice/service/cloud/cloud_service_impl.cpp index 050509d39..3df579859 100644 --- a/services/distributeddataservice/service/cloud/cloud_service_impl.cpp +++ b/services/distributeddataservice/service/cloud/cloud_service_impl.cpp @@ -345,7 +345,9 @@ bool CloudServiceImpl::DoKvCloudSync(int32_t userId, const std::string &bundleNa } for (auto user : users) { for (const auto &store : stores) { - syncManager_.DoCloudSync(SyncManager::SyncInfo(user, store.bundleName, store.storeId, {}, triggerMode)); + int32_t mode = (store.bundleName != bundleName && triggerMode == MODE_PUSH) ? MODE_CONSISTENCY + : triggerMode; + syncManager_.DoCloudSync(SyncManager::SyncInfo(user, store.bundleName, store.storeId, {}, mode)); } } return found;