diff --git a/frameworks/libs/distributeddb/storage/src/cloud/cloud_storage_utils.cpp b/frameworks/libs/distributeddb/storage/src/cloud/cloud_storage_utils.cpp index f4a4f65d727353ba8ffbb3cc19b98fc7551648ac..985d50a74e79e2f1754249456393c61b7d08ef36 100644 --- a/frameworks/libs/distributeddb/storage/src/cloud/cloud_storage_utils.cpp +++ b/frameworks/libs/distributeddb/storage/src/cloud/cloud_storage_utils.cpp @@ -1142,38 +1142,34 @@ int CloudStorageUtils::BindStepConsistentFlagStmt(sqlite3_stmt *stmt, const VBuc std::string gidStr; int errCode = CloudStorageUtils::GetValueFromVBucket(CloudDbConstant::GID_FIELD, data, gidStr); if (errCode != E_OK || gidStr.empty()) { - LOGE("Get gid from bucket fail when mark flag as consistent, errCode = %d", errCode); + LOGE("Get gid fail when mark consistent, err:%d, isEmpty:%d", errCode, gidStr.empty()); return errCode; } - if (gidStr.empty()) { - LOGE("Get empty gid from bucket when mark flag as consistent."); - return -E_CLOUD_ERROR; - } // this data has not yet downloaded asset, skipping if (gidFilters.find(gidStr) != gidFilters.end()) { return E_OK; } errCode = SQLiteUtils::BindTextToStatement(stmt, 1, gidStr); // 1 is cloud_gid if (errCode != E_OK) { - LOGE("Bind cloud_gid to mark flag as consistent stmt failed, %d", errCode); + LOGE("Bind gid fail when mark consistent, err:%d", errCode); return errCode; } int64_t modifyTime; errCode = CloudStorageUtils::GetValueFromVBucket(CloudDbConstant::MODIFY_FIELD, data, modifyTime); if (errCode != E_OK) { - LOGE("Get modify time from bucket fail when mark flag as consistent, errCode = %d", errCode); + LOGE("Get modify time fail when mark consistent, err:%d", errCode); return errCode; } errCode = SQLiteUtils::BindInt64ToStatement(stmt, 2, modifyTime); // 2 is timestamp if (errCode != E_OK) { - LOGE("Bind modify time to mark flag as consistent stmt failed, %d", errCode); + LOGE("Failed to bind timestamp to consistent stmt, err:%d", errCode); return errCode; } errCode = SQLiteUtils::StepWithRetry(stmt); if (errCode == SQLiteUtils::MapSQLiteErrno(SQLITE_DONE)) { errCode = E_OK; } else { - LOGE("[Storage Executor]Step mark flag as consistent stmt failed, %d", errCode); + LOGE("Step consistent stmt failed, err:%d", errCode); } return errCode; }