Unverified Commit b9e8acb5 authored by 蔡宇东's avatar 蔡宇东 Committed by GitHub
Browse files

#2370 clean compile warning (#2371)



* #2370 clean compile warning

Signed-off-by: default avataryudong.cai <yudong.cai@zilliz.com>

* update changelog

Signed-off-by: default avataryudong.cai <yudong.cai@zilliz.com>
parent 42f75104
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -9,6 +9,7 @@ Please mark all change in change log and use the issue from GitHub
-   \#2363 Update branch version to 0.9.1

## Improvement
-   \#2370 Clean compile warning

## Task

+2 −2
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@ constexpr double DEFAULT_THRESHOLD_PERCENT = 0.7;

template <typename ItemObj>
Cache<ItemObj>::Cache(int64_t capacity, int64_t cache_max_count, const std::string& header)
    : usage_(0),
    : header_(header),
      usage_(0),
      capacity_(capacity),
      header_(header),
      freemem_percent_(DEFAULT_THRESHOLD_PERCENT),
      lru_(cache_max_count) {
}
+4 −1
Original line number Diff line number Diff line
@@ -1977,7 +1977,7 @@ DBImpl::MergeHybridFiles(const std::string& collection_id, meta::FilesHolder& fi
        auto file_schema = file;
        file_schema.file_type_ = meta::SegmentSchema::TO_DELETE;
        updated.push_back(file_schema);
        auto size = segment_writer_ptr->Size();
        int64_t size = segment_writer_ptr->Size();
        if (size >= file_schema.index_file_size_) {
            break;
        }
@@ -2558,6 +2558,9 @@ DBImpl::ExecWalRecord(const wal::MXLogRecord& record) {
            }
            break;
        }

        default:
            break;
    }

    return status;
+2 −2
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ SimpleIDGenerator::NextIDNumbers(size_t n, IDNumbers& ids) {
    auto micros = std::chrono::duration_cast<std::chrono::microseconds>(now.time_since_epoch()).count();
    micros *= MAX_IDS_PER_MICRO;

    for (int pos = 0; pos < n; ++pos) {
    for (size_t pos = 0; pos < n; ++pos) {
        ids.push_back(micros + pos);
    }
    return Status::OK();
@@ -114,7 +114,7 @@ SafeIDGenerator::NextIDNumbers(size_t n, IDNumbers& ids) {

    int64_t ID_high_part = time_stamp_ms_ * MAX_IDS_PER_MICRO;

    for (int pos = 0; pos < n; ++pos) {
    for (size_t pos = 0; pos < n; ++pos) {
        ids.push_back(ID_high_part + pos);
    }

+4 −0
Original line number Diff line number Diff line
@@ -22,6 +22,10 @@
namespace milvus {
namespace engine {

const char* ARCHIVE_CONF_DISK = "disk";
const char* ARCHIVE_CONF_DAYS = "days";
const char* DEFAULT_PARTITON_TAG = "_default";

ArchiveConf::ArchiveConf(const std::string& type, const std::string& criterias) {
    ParseType(type);
    ParseCritirias(criterias);
Loading