MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / FeatureStoreMgr

Method FeatureStoreMgr

serving/processor/storage/feature_store_mgr.cc:319–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

317}
318
319FeatureStoreMgr::FeatureStoreMgr(ModelConfig* config)
320 : thread_num_(config->read_thread_num),
321 update_thread_num_(config->update_thread_num),
322 active_thread_index_(0),
323 active_update_thread_index_(0),
324 storage_type_(config->feature_store_type) {
325 if (thread_num_ < 1 || thread_num_ > MANAGER_MAX_THREAD_NUM) {
326 LOG(FATAL) << "Invalid IO thread num, required [1, 96], get "
327 << thread_num_;
328 }
329
330 if (update_thread_num_ < 1 ||
331 update_thread_num_ > MANAGER_MAX_UPDATE_THREAD_NUM) {
332 LOG(FATAL) << "Invalid IO thread num, required [1, 16], get "
333 << update_thread_num_;
334 }
335
336 store_.resize(thread_num_);
337 for (int i = 0; i < thread_num_; ++i) {
338 store_[i] = CreateFeatureStore(config);
339 }
340
341 update_store_.resize(update_thread_num_);
342 for (int i = 0; i < update_thread_num_; ++i) {
343 update_store_[i] = CreateFeatureStore(config);
344 }
345}
346
347FeatureStoreMgr::~FeatureStoreMgr() {
348 for (auto store : store_) {

Callers

nothing calls this directly

Calls 2

CreateFeatureStoreFunction · 0.85
resizeMethod · 0.45

Tested by

no test coverage detected