diff --git a/framework/manager/store/runtime_store.cpp b/framework/manager/store/runtime_store.cpp index 11fafd721d65a4739a1e92150b7d94178a45d8b8..48f6331d9b2e68f0ab217647ecefaf73b0a2f3a0 100755 --- a/framework/manager/store/runtime_store.cpp +++ b/framework/manager/store/runtime_store.cpp @@ -242,11 +242,11 @@ std::vector RuntimeStore::GetEntries(const std::string &dataPrefix) Status RuntimeStore::PutEntries(const std::vector &entries) { - auto size = entries.size(); + size_t size = entries.size(); DistributedKv::Status status; - for (int32_t index = 0; index < size; index += MAX_BATCH_SIZE) { + for (size_t index = 0; index < size; index += MAX_BATCH_SIZE) { std::vector batchEntries(entries.begin() + index, - entries.begin() + std::min(index + MAX_BATCH_SIZE, static_cast(size))); + entries.begin() + std::min(index + MAX_BATCH_SIZE, size)); status = kvStore_->PutBatch(batchEntries); if (status != DistributedKv::Status::SUCCESS) { LOG_ERROR(UDMF_SERVICE, "KvStore putBatch failed, status: %{public}d.", status); @@ -258,11 +258,11 @@ Status RuntimeStore::PutEntries(const std::vector &entries) Status RuntimeStore::DeleteEntries(const std::vector &keys) { - auto size = keys.size(); + size_t size = keys.size(); DistributedKv::Status status; - for (int32_t index = 0; index < size; index += MAX_BATCH_SIZE) { + for (size_t index = 0; index < size; index += MAX_BATCH_SIZE) { std::vector batchKeys(keys.begin() + index, - keys.begin() + std::min(index + MAX_BATCH_SIZE, static_cast(size))); + keys.begin() + std::min(index + MAX_BATCH_SIZE, size)); status = kvStore_->DeleteBatch(batchKeys); if (status != DistributedKv::Status::SUCCESS) { LOG_ERROR(UDMF_SERVICE, "KvStore deleteBatch failed, status: %{public}d.", status);