Merge pull request #721 from milvus-io/0.6.0

Merge from 0.6.0
This commit is contained in:
Jin Hai 2019-12-07 13:48:23 +08:00 committed by GitHub
commit d199e2e080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 4 deletions

View File

@ -69,6 +69,7 @@ Please mark all change in change log and use the ticket from JIRA.
- \#560 - Add version in server config file
- \#605 - Print more messages when server start
- \#644 - Add a new rpc command to get milvus build version whether cpu or gpu
- \#709 - Show last commit id when server start
## Improvement
- \#255 - Add ivfsq8 test report detailed version

View File

@ -23,6 +23,7 @@ message(STATUS "Building using CMake version: ${CMAKE_VERSION}")
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# get build time
MACRO(GET_CURRENT_TIME CURRENT_TIME)
execute_process(COMMAND "date" +"%Y-%m-%d %H:%M.%S" OUTPUT_VARIABLE ${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.")
endif ()
# get Milvus version via branch name
set(GIT_BRANCH_NAME_REGEX "[0-9]+\\.[0-9]+\\.[0-9]")
MACRO(GET_GIT_BRANCH_NAME GIT_BRANCH_NAME)
@ -57,6 +59,21 @@ endif ()
set(MILVUS_VERSION "${GIT_BRANCH_NAME}")
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")
set(BUILD_TYPE "Release")
else ()

View File

@ -1138,6 +1138,7 @@ MySQLMetaImpl::DropTableIndex(const std::string& table_id) {
// set table index type to raw
dropTableIndexQuery << "UPDATE " << META_TABLES
<< " SET engine_type = " << std::to_string(DEFAULT_ENGINE_TYPE)
<< " ,nlist = " << std::to_string(DEFAULT_NLIST)
<< " WHERE table_id = " << mysqlpp::quote << table_id << ";";
ENGINE_LOG_DEBUG << "MySQLMetaImpl::DropTableIndex: " << dropTableIndexQuery.str();

View File

@ -733,7 +733,8 @@ SqliteMetaImpl::DropTableIndex(const std::string& table_id) {
//set table index type to raw
ConnectorPtr->update_all(
set(
c(&TableSchema::engine_type_) = DEFAULT_ENGINE_TYPE),
c(&TableSchema::engine_type_) = DEFAULT_ENGINE_TYPE,
c(&TableSchema::nlist_) = DEFAULT_NLIST),
where(
c(&TableSchema::table_id_) == table_id));

View File

@ -63,6 +63,7 @@ print_banner() {
#else
std::cout << "You are using Milvus CPU edition" << std::endl;
#endif
std::cout << "Last commit id: " << LAST_COMMIT_ID << std::endl;
std::cout << std::endl;
}

View File

@ -17,4 +17,5 @@
#cmakedefine MILVUS_VERSION "@MILVUS_VERSION@"
#cmakedefine BUILD_TYPE "@BUILD_TYPE@"
#cmakedefine BUILD_TIME @BUILD_TIME@
#cmakedefine BUILD_TIME @BUILD_TIME@
#cmakedefine LAST_COMMIT_ID "@LAST_COMMIT_ID@"

View File

@ -371,7 +371,7 @@ TEST_F(MetaTest, INDEX_TEST) {
status = impl_->DropTableIndex(table_id);
ASSERT_TRUE(status.ok());
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.engine_type_, index.engine_type_);

View File

@ -385,7 +385,7 @@ TEST_F(MySqlMetaTest, INDEX_TEST) {
status = impl_->DropTableIndex(table_id);
ASSERT_TRUE(status.ok());
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.engine_type_, index.engine_type_);