mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-02-02 01:06:41 +08:00
* Fix #839 and improve the code quality Signed-off-by: JinHai-CN <hai.jin@zilliz.com> * Fix compiling error and building threads number Signed-off-by: JinHai-CN <hai.jin@zilliz.com>
This commit is contained in:
parent
80528fed99
commit
8b4bcf768b
@ -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/**'
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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),
|
||||
|
||||
@ -341,7 +341,7 @@ WalManager::DeleteById(const std::string& table_id, const IDNumbers& vector_ids)
|
||||
}
|
||||
|
||||
uint64_t
|
||||
WalManager::Flush(const std::string table_id) {
|
||||
WalManager::Flush(const std::string& table_id) {
|
||||
std::lock_guard<std::mutex> lck(mutex_);
|
||||
// At most one flush requirement is waiting at any time.
|
||||
// Otherwise, flush_info_ should be modified to a list.
|
||||
|
||||
@ -107,7 +107,7 @@ class WalManager {
|
||||
* else, return 0
|
||||
*/
|
||||
uint64_t
|
||||
Flush(const std::string table_id = "");
|
||||
Flush(const std::string& table_id = "");
|
||||
|
||||
void
|
||||
RemoveOldFiles(uint64_t flushed_lsn);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user