mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-30 23:45:28 +08:00
warn when use sqlite as metadata management (#2065)
Signed-off-by: wxyu <xy.wang@zilliz.com>
This commit is contained in:
parent
2c2021c938
commit
67819be29b
@ -10,6 +10,7 @@ Please mark all change in change log and use the issue from GitHub
|
||||
|
||||
## Feature
|
||||
- \#1965 FAISS/NSG/HNSW/ANNOY use unified distance calculation algorithm
|
||||
- \#2064 Warn when use SQLite as metadata management
|
||||
|
||||
## Improvement
|
||||
- \#221 Refactor LOG macro
|
||||
|
||||
@ -35,6 +35,9 @@
|
||||
#include "utils/StringHelpFunctions.h"
|
||||
#include "utils/ValidationUtil.h"
|
||||
|
||||
#define USING_SQLITE_WARNING LOG_ENGINE_WARNING_ << \
|
||||
"You are using SQLite as the meta data management, which can't be used in production. Please change it to MySQL!";
|
||||
|
||||
namespace milvus {
|
||||
namespace engine {
|
||||
namespace meta {
|
||||
@ -242,6 +245,7 @@ SqliteMetaImpl::Initialize() {
|
||||
|
||||
Status
|
||||
SqliteMetaImpl::CreateCollection(CollectionSchema& collection_schema) {
|
||||
USING_SQLITE_WARNING
|
||||
try {
|
||||
server::MetricCollector metric;
|
||||
|
||||
@ -436,6 +440,7 @@ SqliteMetaImpl::DeleteCollectionFiles(const std::string& collection_id) {
|
||||
|
||||
Status
|
||||
SqliteMetaImpl::CreateCollectionFile(SegmentSchema& file_schema) {
|
||||
USING_SQLITE_WARNING
|
||||
if (file_schema.date_ == EmptyDate) {
|
||||
file_schema.date_ = utils::GetDate();
|
||||
}
|
||||
@ -899,6 +904,7 @@ SqliteMetaImpl::DropCollectionIndex(const std::string& collection_id) {
|
||||
Status
|
||||
SqliteMetaImpl::CreatePartition(const std::string& collection_id, const std::string& partition_name, const std::string& tag,
|
||||
uint64_t lsn) {
|
||||
USING_SQLITE_WARNING
|
||||
server::MetricCollector metric;
|
||||
|
||||
CollectionSchema collection_schema;
|
||||
@ -1852,6 +1858,7 @@ SqliteMetaImpl::GetGlobalLastLSN(uint64_t& lsn) {
|
||||
Status
|
||||
SqliteMetaImpl::CreateHybridCollection(meta::CollectionSchema& collection_schema,
|
||||
meta::hybrid::FieldsSchema& fields_schema) {
|
||||
USING_SQLITE_WARNING
|
||||
try {
|
||||
server::MetricCollector metric;
|
||||
|
||||
@ -1912,7 +1919,6 @@ SqliteMetaImpl::CreateHybridCollection(meta::CollectionSchema& collection_schema
|
||||
Status
|
||||
SqliteMetaImpl::DescribeHybridCollection(milvus::engine::meta::CollectionSchema& collection_schema,
|
||||
milvus::engine::meta::hybrid::FieldsSchema& fields_schema) {
|
||||
|
||||
try {
|
||||
server::MetricCollector metric;
|
||||
fiu_do_on("SqliteMetaImpl.DescriCollection.throw_exception", throw std::exception());
|
||||
@ -1970,7 +1976,7 @@ SqliteMetaImpl::DescribeHybridCollection(milvus::engine::meta::CollectionSchema&
|
||||
|
||||
Status
|
||||
SqliteMetaImpl::CreateHybridCollectionFile(SegmentSchema& file_schema) {
|
||||
|
||||
USING_SQLITE_WARNING
|
||||
if (file_schema.date_ == EmptyDate) {
|
||||
file_schema.date_ = utils::GetDate();
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user