mirror of
https://gitee.com/openharmony/distributeddatamgr_datamgr_service
synced 2024-11-23 06:50:35 +00:00
commit
c43735f2be
@ -32,12 +32,12 @@ bool CloudReport::RegisterCloudReportInstance(CloudReport *instance)
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string CloudReport::GetPrepareTraceId(int32_t userId, const std::string &bundleName)
|
||||
std::string CloudReport::GetPrepareTraceId(int32_t userId)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string CloudReport::GetRequestTraceId(int32_t userId, const std::string &bundleName)
|
||||
std::string CloudReport::GetRequestTraceId(int32_t userId)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
@ -25,8 +25,8 @@ public:
|
||||
using ReportParam = DistributedData::ReportParam;
|
||||
API_EXPORT static CloudReport *GetInstance();
|
||||
API_EXPORT static bool RegisterCloudReportInstance(CloudReport *instance);
|
||||
virtual std::string GetPrepareTraceId(int32_t userId, const std::string &bundleName);
|
||||
virtual std::string GetRequestTraceId(int32_t userId, const std::string &bundleName);
|
||||
virtual std::string GetPrepareTraceId(int32_t userId);
|
||||
virtual std::string GetRequestTraceId(int32_t userId);
|
||||
virtual bool Report(const ReportParam &reportParam);
|
||||
|
||||
private:
|
||||
|
@ -154,7 +154,7 @@ bool SyncManager::SyncInfo::Contains(const std::string &storeName)
|
||||
|
||||
std::function<void(const Event &)> SyncManager::GetLockChangeHandler()
|
||||
{
|
||||
return [this](const Event &event) {
|
||||
return [](const Event &event) {
|
||||
auto &evt = static_cast<const CloudLockEvent &>(event);
|
||||
auto storeInfo = evt.GetStoreInfo();
|
||||
auto callback = evt.GetCallback();
|
||||
@ -623,10 +623,10 @@ SyncManager::TraceIds SyncManager::GetPrepareTraceId(const SyncInfo &info, const
|
||||
}
|
||||
if (info.bundleName_.empty()) {
|
||||
for (const auto &it : cloud.apps) {
|
||||
traceIds.emplace(it.first, cloudReport->GetPrepareTraceId(info.user_, it.first));
|
||||
traceIds.emplace(it.first, cloudReport->GetPrepareTraceId(info.user_));
|
||||
}
|
||||
} else {
|
||||
traceIds.emplace(info.bundleName_, cloudReport->GetPrepareTraceId(info.user_, info.bundleName_));
|
||||
traceIds.emplace(info.bundleName_, cloudReport->GetPrepareTraceId(info.user_));
|
||||
}
|
||||
return traceIds;
|
||||
}
|
||||
|
@ -129,6 +129,7 @@ private:
|
||||
static std::vector<std::tuple<QueryKey, uint64_t>> GetCloudSyncInfo(const SyncInfo &info, CloudInfo &cloud);
|
||||
static std::vector<SchemaMeta> GetSchemaMeta(const CloudInfo &cloud, const std::string &bundleName);
|
||||
static bool NeedGetCloudInfo(CloudInfo &cloud);
|
||||
static GeneralError IsValid(SyncInfo &info, CloudInfo &cloud);
|
||||
Task GetSyncTask(int32_t times, bool retry, RefCount ref, SyncInfo &&syncInfo);
|
||||
void UpdateSchema(const SyncInfo &syncInfo);
|
||||
std::function<void(const Event &)> GetSyncHandler(Retryer retryer);
|
||||
@ -136,7 +137,6 @@ private:
|
||||
Retryer GetRetryer(int32_t times, const SyncInfo &syncInfo, int32_t user);
|
||||
RefCount GenSyncRef(uint64_t syncId);
|
||||
int32_t Compare(uint64_t syncId, int32_t user);
|
||||
GeneralError IsValid(SyncInfo &info, CloudInfo &cloud);
|
||||
void UpdateStartSyncInfo(const std::vector<std::tuple<QueryKey, uint64_t>> &cloudSyncInfos);
|
||||
void UpdateFinishSyncInfo(const QueryKey &queryKey, uint64_t syncId, int32_t code);
|
||||
std::function<void(const DistributedData::GenDetails &result)> GetCallback(const GenAsync &async,
|
||||
|
Loading…
Reference in New Issue
Block a user