mirror of https://github.com/milvus-io/milvus.git
refactor(db): refactor options
Former-commit-id: 2631c7298346b6dcfbde0d43bc58f36e36eef807pull/191/head
parent
a5f318d33e
commit
062e370bee
|
@ -19,7 +19,7 @@ DBImpl::DBImpl(const Options& options_, const std::string& name_)
|
|||
_options(options_),
|
||||
_bg_compaction_scheduled(false),
|
||||
_shutting_down(false),
|
||||
_pMeta(new meta::DBMetaImpl(*(_options.pMetaOptions))),
|
||||
_pMeta(new meta::DBMetaImpl(_options.meta)),
|
||||
_pMemMgr(new MemManager(_pMeta)) {
|
||||
start_timer_task(options_.memory_sync_interval);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ private:
|
|||
|
||||
Status initialize();
|
||||
|
||||
const DBMetaOptions& _options;
|
||||
const DBMetaOptions _options;
|
||||
|
||||
}; // DBMetaImpl
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "Options.h"
|
||||
#include "Env.h"
|
||||
#include "DBMetaImpl.h"
|
||||
|
||||
namespace zilliz {
|
||||
namespace vecwise {
|
||||
|
|
|
@ -7,25 +7,8 @@ namespace zilliz {
|
|||
namespace vecwise {
|
||||
namespace engine {
|
||||
|
||||
class MetaOptions;
|
||||
class Env;
|
||||
|
||||
struct Options {
|
||||
Options();
|
||||
uint16_t memory_sync_interval = 10;
|
||||
uint16_t raw_file_merge_trigger_number = 100;
|
||||
size_t raw_to_index_trigger_size = 100000;
|
||||
std::shared_ptr<MetaOptions> pMetaOptions;
|
||||
Env* env;
|
||||
}; // Options
|
||||
|
||||
|
||||
struct GroupOptions {
|
||||
size_t dimension;
|
||||
bool has_id = false;
|
||||
}; // GroupOptions
|
||||
|
||||
|
||||
struct MetaOptions {
|
||||
}; // MetaOptions
|
||||
|
||||
|
@ -36,6 +19,22 @@ struct DBMetaOptions : public MetaOptions {
|
|||
}; // DBMetaOptions
|
||||
|
||||
|
||||
struct Options {
|
||||
Options();
|
||||
uint16_t memory_sync_interval = 10;
|
||||
uint16_t raw_file_merge_trigger_number = 100;
|
||||
size_t raw_to_index_trigger_size = 100000;
|
||||
Env* env;
|
||||
DBMetaOptions meta;
|
||||
}; // Options
|
||||
|
||||
|
||||
struct GroupOptions {
|
||||
size_t dimension;
|
||||
bool has_id = false;
|
||||
}; // GroupOptions
|
||||
|
||||
|
||||
} // namespace engine
|
||||
} // namespace vecwise
|
||||
} // namespace zilliz
|
||||
|
|
Loading…
Reference in New Issue