mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-03 20:39:36 +08:00
commit
d199e2e080
@ -69,6 +69,7 @@ Please mark all change in change log and use the ticket from JIRA.
|
|||||||
- \#560 - Add version in server config file
|
- \#560 - Add version in server config file
|
||||||
- \#605 - Print more messages when server start
|
- \#605 - Print more messages when server start
|
||||||
- \#644 - Add a new rpc command to get milvus build version whether cpu or gpu
|
- \#644 - Add a new rpc command to get milvus build version whether cpu or gpu
|
||||||
|
- \#709 - Show last commit id when server start
|
||||||
|
|
||||||
## Improvement
|
## Improvement
|
||||||
- \#255 - Add ivfsq8 test report detailed version
|
- \#255 - Add ivfsq8 test report detailed version
|
||||||
|
@ -23,6 +23,7 @@ message(STATUS "Building using CMake version: ${CMAKE_VERSION}")
|
|||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
|
# get build time
|
||||||
MACRO(GET_CURRENT_TIME CURRENT_TIME)
|
MACRO(GET_CURRENT_TIME CURRENT_TIME)
|
||||||
execute_process(COMMAND "date" +"%Y-%m-%d %H:%M.%S" OUTPUT_VARIABLE ${CURRENT_TIME})
|
execute_process(COMMAND "date" +"%Y-%m-%d %H:%M.%S" OUTPUT_VARIABLE ${CURRENT_TIME})
|
||||||
ENDMACRO(GET_CURRENT_TIME)
|
ENDMACRO(GET_CURRENT_TIME)
|
||||||
@ -35,6 +36,7 @@ if (NOT DEFINED CMAKE_BUILD_TYPE)
|
|||||||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build.")
|
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build.")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# get Milvus version via branch name
|
||||||
set(GIT_BRANCH_NAME_REGEX "[0-9]+\\.[0-9]+\\.[0-9]")
|
set(GIT_BRANCH_NAME_REGEX "[0-9]+\\.[0-9]+\\.[0-9]")
|
||||||
|
|
||||||
MACRO(GET_GIT_BRANCH_NAME GIT_BRANCH_NAME)
|
MACRO(GET_GIT_BRANCH_NAME GIT_BRANCH_NAME)
|
||||||
@ -57,6 +59,21 @@ endif ()
|
|||||||
set(MILVUS_VERSION "${GIT_BRANCH_NAME}")
|
set(MILVUS_VERSION "${GIT_BRANCH_NAME}")
|
||||||
string(REGEX MATCH "${GIT_BRANCH_NAME_REGEX}" MILVUS_VERSION "${MILVUS_VERSION}")
|
string(REGEX MATCH "${GIT_BRANCH_NAME_REGEX}" MILVUS_VERSION "${MILVUS_VERSION}")
|
||||||
|
|
||||||
|
# get last commit id
|
||||||
|
MACRO(GET_LAST_COMMIT_ID LAST_COMMIT_ID)
|
||||||
|
execute_process(COMMAND sh "-c" "git log --decorate | head -n 1 | awk '{print $2}'"
|
||||||
|
OUTPUT_VARIABLE ${LAST_COMMIT_ID})
|
||||||
|
ENDMACRO(GET_LAST_COMMIT_ID)
|
||||||
|
|
||||||
|
GET_LAST_COMMIT_ID(LAST_COMMIT_ID)
|
||||||
|
message(STATUS "LAST_COMMIT_ID = ${LAST_COMMIT_ID}")
|
||||||
|
if (NOT LAST_COMMIT_ID STREQUAL "")
|
||||||
|
string(REGEX REPLACE "\n" "" LAST_COMMIT_ID ${LAST_COMMIT_ID})
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
set(LAST_COMMIT_ID "${LAST_COMMIT_ID}")
|
||||||
|
|
||||||
|
# set build type
|
||||||
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
if (CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
set(BUILD_TYPE "Release")
|
set(BUILD_TYPE "Release")
|
||||||
else ()
|
else ()
|
||||||
|
@ -1138,6 +1138,7 @@ MySQLMetaImpl::DropTableIndex(const std::string& table_id) {
|
|||||||
// set table index type to raw
|
// set table index type to raw
|
||||||
dropTableIndexQuery << "UPDATE " << META_TABLES
|
dropTableIndexQuery << "UPDATE " << META_TABLES
|
||||||
<< " SET engine_type = " << std::to_string(DEFAULT_ENGINE_TYPE)
|
<< " SET engine_type = " << std::to_string(DEFAULT_ENGINE_TYPE)
|
||||||
|
<< " ,nlist = " << std::to_string(DEFAULT_NLIST)
|
||||||
<< " WHERE table_id = " << mysqlpp::quote << table_id << ";";
|
<< " WHERE table_id = " << mysqlpp::quote << table_id << ";";
|
||||||
|
|
||||||
ENGINE_LOG_DEBUG << "MySQLMetaImpl::DropTableIndex: " << dropTableIndexQuery.str();
|
ENGINE_LOG_DEBUG << "MySQLMetaImpl::DropTableIndex: " << dropTableIndexQuery.str();
|
||||||
|
@ -733,7 +733,8 @@ SqliteMetaImpl::DropTableIndex(const std::string& table_id) {
|
|||||||
//set table index type to raw
|
//set table index type to raw
|
||||||
ConnectorPtr->update_all(
|
ConnectorPtr->update_all(
|
||||||
set(
|
set(
|
||||||
c(&TableSchema::engine_type_) = DEFAULT_ENGINE_TYPE),
|
c(&TableSchema::engine_type_) = DEFAULT_ENGINE_TYPE,
|
||||||
|
c(&TableSchema::nlist_) = DEFAULT_NLIST),
|
||||||
where(
|
where(
|
||||||
c(&TableSchema::table_id_) == table_id));
|
c(&TableSchema::table_id_) == table_id));
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ print_banner() {
|
|||||||
#else
|
#else
|
||||||
std::cout << "You are using Milvus CPU edition" << std::endl;
|
std::cout << "You are using Milvus CPU edition" << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
std::cout << "Last commit id: " << LAST_COMMIT_ID << std::endl;
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,4 +17,5 @@
|
|||||||
|
|
||||||
#cmakedefine MILVUS_VERSION "@MILVUS_VERSION@"
|
#cmakedefine MILVUS_VERSION "@MILVUS_VERSION@"
|
||||||
#cmakedefine BUILD_TYPE "@BUILD_TYPE@"
|
#cmakedefine BUILD_TYPE "@BUILD_TYPE@"
|
||||||
#cmakedefine BUILD_TIME @BUILD_TIME@
|
#cmakedefine BUILD_TIME @BUILD_TIME@
|
||||||
|
#cmakedefine LAST_COMMIT_ID "@LAST_COMMIT_ID@"
|
||||||
|
@ -371,7 +371,7 @@ TEST_F(MetaTest, INDEX_TEST) {
|
|||||||
status = impl_->DropTableIndex(table_id);
|
status = impl_->DropTableIndex(table_id);
|
||||||
ASSERT_TRUE(status.ok());
|
ASSERT_TRUE(status.ok());
|
||||||
status = impl_->DescribeTableIndex(table_id, index_out);
|
status = impl_->DescribeTableIndex(table_id, index_out);
|
||||||
ASSERT_NE(index_out.metric_type_, index.metric_type_);
|
ASSERT_EQ(index_out.metric_type_, index.metric_type_);
|
||||||
ASSERT_NE(index_out.nlist_, index.nlist_);
|
ASSERT_NE(index_out.nlist_, index.nlist_);
|
||||||
ASSERT_NE(index_out.engine_type_, index.engine_type_);
|
ASSERT_NE(index_out.engine_type_, index.engine_type_);
|
||||||
|
|
||||||
|
@ -385,7 +385,7 @@ TEST_F(MySqlMetaTest, INDEX_TEST) {
|
|||||||
status = impl_->DropTableIndex(table_id);
|
status = impl_->DropTableIndex(table_id);
|
||||||
ASSERT_TRUE(status.ok());
|
ASSERT_TRUE(status.ok());
|
||||||
status = impl_->DescribeTableIndex(table_id, index_out);
|
status = impl_->DescribeTableIndex(table_id, index_out);
|
||||||
ASSERT_NE(index_out.metric_type_, index.metric_type_);
|
ASSERT_EQ(index_out.metric_type_, index.metric_type_);
|
||||||
ASSERT_NE(index_out.nlist_, index.nlist_);
|
ASSERT_NE(index_out.nlist_, index.nlist_);
|
||||||
ASSERT_NE(index_out.engine_type_, index.engine_type_);
|
ASSERT_NE(index_out.engine_type_, index.engine_type_);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user