From 8e7b3a7edcd6c903e5873e7a0577526e10a9dbaf Mon Sep 17 00:00:00 2001 From: yangliu Date: Thu, 11 Sep 2025 10:32:41 +0800 Subject: [PATCH 1/5] update Signed-off-by: yangliu --- .../adapter/communicator/src/device_manager_adapter.cpp | 6 +++--- .../adapter/dfx/src/hiview_adapter.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/services/distributeddataservice/adapter/communicator/src/device_manager_adapter.cpp b/services/distributeddataservice/adapter/communicator/src/device_manager_adapter.cpp index ea4915cf9..198e8c3d4 100644 --- a/services/distributeddataservice/adapter/communicator/src/device_manager_adapter.cpp +++ b/services/distributeddataservice/adapter/communicator/src/device_manager_adapter.cpp @@ -309,7 +309,7 @@ bool DeviceManagerAdapter::GetDeviceInfo(const DmDeviceInfo &dmInfo, DeviceInfo } DeviceExtraInfo deviceExtraInfo; if (!DistributedData::Serializable::Unmarshall(dmInfo.extraData, deviceExtraInfo)) { - ZLOGE("Unmarshall failed, deviceExtraInfo:%{public}s", dmInfo.extraData.c_str()); + ZLOGE("Unmarshall extraData failed. uuid:%{public}s", Anonymous::Change(uuid).c_str()); return false; } dvInfo = { uuid, udid, networkId, std::string(dmInfo.deviceName), dmInfo.deviceTypeId, deviceExtraInfo.OS_TYPE, @@ -380,7 +380,7 @@ std::vector DeviceManagerAdapter::GetRemoteDevices() auto udid = GetUdidByNetworkId(networkId); DeviceExtraInfo deviceExtraInfo; if (!DistributedData::Serializable::Unmarshall(dmInfo.extraData, deviceExtraInfo)) { - ZLOGE("Unmarshall failed, deviceExtraInfo:%{public}s", dmInfo.extraData.c_str()); + ZLOGE("Unmarshall extraData failed. uuid:%{public}s", Anonymous::Change(uuid).c_str()); continue; } DeviceInfo dvInfo = { std::move(uuid), std::move(udid), std::move(networkId), @@ -495,7 +495,7 @@ DeviceInfo DeviceManagerAdapter::GetLocalDeviceInfo() } DeviceExtraInfo deviceExtraInfo; if (!DistributedData::Serializable::Unmarshall(info.extraData, deviceExtraInfo)) { - ZLOGE("Unmarshall failed, deviceExtraInfo:%{public}s", info.extraData.c_str()); + ZLOGE("Unmarshall extraData failed. uuid:%{public}s", Anonymous::Change(uuid).c_str()); return {}; } ZLOGI("[LocalDevice] uuid:%{public}s, name:%{public}s, type:%{public}d, osType:%{public}d", diff --git a/services/distributeddataservice/adapter/dfx/src/hiview_adapter.cpp b/services/distributeddataservice/adapter/dfx/src/hiview_adapter.cpp index ff1d19ec2..95a148654 100644 --- a/services/distributeddataservice/adapter/dfx/src/hiview_adapter.cpp +++ b/services/distributeddataservice/adapter/dfx/src/hiview_adapter.cpp @@ -70,7 +70,7 @@ void HiViewAdapter::ReportArkDataFault(int dfxCode, const ArkDataFaultMsg &msg, std::string occurTime = DistributedData::TimeUtils::GetCurSysTimeWithMs(); std::string bundleName = msg.bundleName; std::string moduleName = msg.moduleName; - std::string storeName = msg.storeName; + std::string storeId = msg.storeId; std::string businessType = msg.businessType; std::string appendix = msg.appendixMsg; std::string faultType = msg.faultType; @@ -79,7 +79,7 @@ void HiViewAdapter::ReportArkDataFault(int dfxCode, const ArkDataFaultMsg &msg, { .name = { "FAULT_TYPE" }, .t = HISYSEVENT_STRING, .v = { .s = faultType.data() }, .arraySize = 0 }, { .name = { "BUNDLE_NAME" }, .t = HISYSEVENT_STRING, .v = { .s = bundleName.data() }, .arraySize = 0 }, { .name = { "MODULE_NAME" }, .t = HISYSEVENT_STRING, .v = { .s = moduleName.data() }, .arraySize = 0 }, - { .name = { "STORE_NAME" }, .t = HISYSEVENT_STRING, .v = { .s = storeName.data() }, .arraySize = 0 }, + { .name = { "STORE_NAME" }, .t = HISYSEVENT_STRING, .v = { .s = storeId.data() }, .arraySize = 0 }, { .name = { "BUSINESS_TYPE" }, .t = HISYSEVENT_STRING, .v = { .s = businessType.data() }, .arraySize = 0 }, { .name = { "ERROR_CODE" }, .t = HISYSEVENT_INT32, .v = { .i32 = msg.errorType }, .arraySize = 0 }, { .name = { "APPENDIX" }, .t = HISYSEVENT_STRING, .v = { .s = appendix.data() }, .arraySize = 0 }, -- Gitee From 65a58c50c550ec2aca109a320ecacc3e9e576f41 Mon Sep 17 00:00:00 2001 From: yangliu Date: Thu, 11 Sep 2025 11:11:37 +0800 Subject: [PATCH 2/5] update Signed-off-by: yangliu --- .../distributeddataservice/framework/include/dfx/dfx_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/distributeddataservice/framework/include/dfx/dfx_types.h b/services/distributeddataservice/framework/include/dfx/dfx_types.h index ae9f838a6..656379c11 100644 --- a/services/distributeddataservice/framework/include/dfx/dfx_types.h +++ b/services/distributeddataservice/framework/include/dfx/dfx_types.h @@ -74,7 +74,7 @@ struct ArkDataFaultMsg { std::string faultType; std::string bundleName; std::string moduleName; - std::string storeName; + std::string storeId; std::string businessType; int32_t errorType; std::string appendixMsg; -- Gitee From ec7d84c6ef502dbaf87d1e02ee215520777cb798 Mon Sep 17 00:00:00 2001 From: yangliu Date: Thu, 11 Sep 2025 11:31:58 +0800 Subject: [PATCH 3/5] update Signed-off-by: yangliu --- .../distributeddataservice/service/kvdb/kvdb_general_store.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp b/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp index f18d59547..06681128b 100644 --- a/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp +++ b/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp @@ -397,7 +397,7 @@ void KVDBGeneralStore::Report(const std::string &faultType, int32_t errCode, con ArkDataFaultMsg msg = { .faultType = faultType, .bundleName = storeInfo_.bundleName, .moduleName = ModuleName::KV_STORE, - .storeName = storeInfo_.storeName, + .storeId = storeInfo_.storeName, .errorType = errCode + GeneralStore::CLOUD_ERR_OFFSET, .appendixMsg = appendix }; Reporter::GetInstance()->CloudSyncFault()->Report(msg); -- Gitee From 643f6e0f93a1763d08775bba3319eb611e8c45d1 Mon Sep 17 00:00:00 2001 From: yangliu Date: Thu, 11 Sep 2025 11:58:20 +0800 Subject: [PATCH 4/5] update Signed-off-by: yangliu --- .../distributeddataservice/adapter/dfx/src/hiview_adapter.cpp | 4 ++-- .../distributeddataservice/framework/include/dfx/dfx_types.h | 2 +- .../service/kvdb/kvdb_general_store.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/services/distributeddataservice/adapter/dfx/src/hiview_adapter.cpp b/services/distributeddataservice/adapter/dfx/src/hiview_adapter.cpp index 95a148654..ff1d19ec2 100644 --- a/services/distributeddataservice/adapter/dfx/src/hiview_adapter.cpp +++ b/services/distributeddataservice/adapter/dfx/src/hiview_adapter.cpp @@ -70,7 +70,7 @@ void HiViewAdapter::ReportArkDataFault(int dfxCode, const ArkDataFaultMsg &msg, std::string occurTime = DistributedData::TimeUtils::GetCurSysTimeWithMs(); std::string bundleName = msg.bundleName; std::string moduleName = msg.moduleName; - std::string storeId = msg.storeId; + std::string storeName = msg.storeName; std::string businessType = msg.businessType; std::string appendix = msg.appendixMsg; std::string faultType = msg.faultType; @@ -79,7 +79,7 @@ void HiViewAdapter::ReportArkDataFault(int dfxCode, const ArkDataFaultMsg &msg, { .name = { "FAULT_TYPE" }, .t = HISYSEVENT_STRING, .v = { .s = faultType.data() }, .arraySize = 0 }, { .name = { "BUNDLE_NAME" }, .t = HISYSEVENT_STRING, .v = { .s = bundleName.data() }, .arraySize = 0 }, { .name = { "MODULE_NAME" }, .t = HISYSEVENT_STRING, .v = { .s = moduleName.data() }, .arraySize = 0 }, - { .name = { "STORE_NAME" }, .t = HISYSEVENT_STRING, .v = { .s = storeId.data() }, .arraySize = 0 }, + { .name = { "STORE_NAME" }, .t = HISYSEVENT_STRING, .v = { .s = storeName.data() }, .arraySize = 0 }, { .name = { "BUSINESS_TYPE" }, .t = HISYSEVENT_STRING, .v = { .s = businessType.data() }, .arraySize = 0 }, { .name = { "ERROR_CODE" }, .t = HISYSEVENT_INT32, .v = { .i32 = msg.errorType }, .arraySize = 0 }, { .name = { "APPENDIX" }, .t = HISYSEVENT_STRING, .v = { .s = appendix.data() }, .arraySize = 0 }, diff --git a/services/distributeddataservice/framework/include/dfx/dfx_types.h b/services/distributeddataservice/framework/include/dfx/dfx_types.h index 656379c11..ae9f838a6 100644 --- a/services/distributeddataservice/framework/include/dfx/dfx_types.h +++ b/services/distributeddataservice/framework/include/dfx/dfx_types.h @@ -74,7 +74,7 @@ struct ArkDataFaultMsg { std::string faultType; std::string bundleName; std::string moduleName; - std::string storeId; + std::string storeName; std::string businessType; int32_t errorType; std::string appendixMsg; diff --git a/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp b/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp index 06681128b..f18d59547 100644 --- a/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp +++ b/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp @@ -397,7 +397,7 @@ void KVDBGeneralStore::Report(const std::string &faultType, int32_t errCode, con ArkDataFaultMsg msg = { .faultType = faultType, .bundleName = storeInfo_.bundleName, .moduleName = ModuleName::KV_STORE, - .storeId = storeInfo_.storeName, + .storeName = storeInfo_.storeName, .errorType = errCode + GeneralStore::CLOUD_ERR_OFFSET, .appendixMsg = appendix }; Reporter::GetInstance()->CloudSyncFault()->Report(msg); -- Gitee From 30b2ab16bd0618486a4e7314869ee789f3e1990c Mon Sep 17 00:00:00 2001 From: yangliu Date: Thu, 11 Sep 2025 16:22:06 +0800 Subject: [PATCH 5/5] update Signed-off-by: yangliu --- .../service/kvdb/kvdb_general_store.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp b/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp index f18d59547..ec09a29e3 100644 --- a/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp +++ b/services/distributeddataservice/service/kvdb/kvdb_general_store.cpp @@ -443,8 +443,8 @@ std::pair KVDBGeneralStore::Sync(const Devices &devices, GenQu dbStatus = delegate_->UnSubscribeRemoteQuery(devices, GetDBSyncCompleteCB(std::move(async)), dbQuery, false); } else if (syncMode < NEARBY_END) { - DeviceSyncOption syncOption = { .devices = devices, .mode = dbMode, .isQuery = !kvQuery->IsEmpty(), - .query = dbQuery, .isWait = false, .isRetry = syncParam.isRetry }; + DeviceSyncOption syncOption = { .devices = devices, .mode = dbMode, .query = dbQuery, + .isQuery = !kvQuery->IsEmpty(), .isWait = false, .isRetry = syncParam.isRetry }; dbStatus = delegate_->Sync(syncOption, GetDBSyncCompleteCB(std::move(async))); } else { ZLOGE("Err sync mode! sync mode:%{public}d", syncMode); -- Gitee