Unverified Commit 8b4bcf76 authored by Jin Hai's avatar Jin Hai Committed by GitHub
Browse files

Fix #839 and improve the code quality (#1470)



* Fix #839 and improve the code quality

Signed-off-by: default avatarJinHai-CN <hai.jin@zilliz.com>

* Fix compiling error and building threads number

Signed-off-by: default avatarJinHai-CN <hai.jin@zilliz.com>
parent 80528fed
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2,3 +2,6 @@ exclude_paths:
  - 'core/src/index/thirdparty/**'
  - 'sdk/build-support/**'
  - 'core/build-support/**'
  - 'core/src/grpc/gen-milvus/**'
  - 'core/src/grpc/gen-status/**'
  - 'sdk/grpc-gen/**'
+1 −1
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
fi

# compile and build
make -j8 || exit 1
make -j6 || exit 1

if [[ ${PRIVILEGES} == "ON" ]];then
    sudo make install || exit 1
+6 −2
Original line number Diff line number Diff line
@@ -432,8 +432,12 @@ DBImpl::DropPartition(const std::string& partition_name) {
        return SHUTDOWN_ERROR;
    }

    auto status = mem_mgr_->EraseMemVector(partition_name);  // not allow insert
    status = meta_ptr_->DropPartition(partition_name);       // soft delete table
    mem_mgr_->EraseMemVector(partition_name);                // not allow insert
    auto status = meta_ptr_->DropPartition(partition_name);  // soft delete table
    if (!status.ok()) {
        ENGINE_LOG_ERROR << status.message();
        return status;
    }

    // scheduler will determine when to delete table files
    auto nres = scheduler::ResMgrInst::GetInstance()->GetNumOfComputeResource();
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ class DBImpl : public DB {
    PreloadTable(const std::string& table_id) override;

    Status
    UpdateTableFlag(const std::string& table_id, int64_t flag);
    UpdateTableFlag(const std::string& table_id, int64_t flag) override;

    Status
    GetTableRowCount(const std::string& table_id, uint64_t& row_count) override;
+2 −2
Original line number Diff line number Diff line
@@ -24,8 +24,8 @@ namespace meta {
class MySQLConnectionPool : public mysqlpp::ConnectionPool {
 public:
    // The object's only constructor
    MySQLConnectionPool(std::string dbName, std::string userName, std::string passWord, std::string serverIp,
                        int port = 0, int maxPoolSize = 8)
    MySQLConnectionPool(const std::string& dbName, const std::string& userName, const std::string& passWord,
                        const std::string& serverIp, int port = 0, int maxPoolSize = 8)
        : db_(dbName),
          user_(userName),
          password_(passWord),
Loading