未验证 提交 77fa39f4 编写于 作者: G groot 提交者: GitHub

remove SS (#3040)

* remove SS
Signed-off-by: Nyhmo <yihua.mo@zilliz.com>

* modify pr template
Signed-off-by: Nyhmo <yihua.mo@zilliz.com>
上级 c933a97c
......@@ -6,6 +6,7 @@
- [ ] Documentation
- [ ] Feature
- [ ] Test and CI
- [ ] Code Refactoring
**Which branch you want to cherry-pick to?**
......
......@@ -566,7 +566,7 @@ DBImpl::Query(const server::ContextPtr& context, const query::QueryPtr& query_pt
TimeRecorder rc("SSDBImpl::Query");
scheduler::SSSearchJobPtr job = std::make_shared<scheduler::SearchJob>(nullptr, options_, query_ptr);
scheduler::SearchJobPtr job = std::make_shared<scheduler::SearchJob>(nullptr, options_, query_ptr);
/* put search job to scheduler and wait job finish */
scheduler::JobMgrInst::GetInstance()->Put(job);
......@@ -616,7 +616,7 @@ DBImpl::Query(const server::ContextPtr& context, const query::QueryPtr& query_pt
// LOG_ENGINE_DEBUG_ << LogOut("Engine query begin, segment count: %ld", segment_visitors.size());
//
// VectorsData vectors;
// scheduler::SSSearchJobPtr job =
// scheduler::SearchJobPtr job =
// std::make_shared<scheduler::SSSearchJob>(tracer.Context(), general_query, query_ptr, attr_type, vectors);
// for (auto& sv : segment_visitors) {
// job->AddSegmentVisitor(sv);
......@@ -943,7 +943,7 @@ DBImpl::BackgroundBuildIndexTask(std::vector<std::string> collection_names) {
snapshot::IDS_TYPE segment_ids;
ss_visitor.SegmentsToIndex("", segment_ids);
scheduler::SSBuildIndexJobPtr job =
scheduler::BuildIndexJobPtr job =
std::make_shared<scheduler::BuildIndexJob>(options_, collection_name, segment_ids);
scheduler::JobMgrInst::GetInstance()->Put(job);
......
......@@ -19,13 +19,13 @@
namespace milvus {
namespace engine {
SSExecutionEnginePtr
ExecutionEnginePtr
EngineFactory::Build(const std::string& dir_root, const std::string& collection_name, int64_t segment_id) {
snapshot::ScopedSnapshotT ss;
snapshot::Snapshots::GetInstance().GetSnapshot(ss, collection_name);
auto seg_visitor = engine::SegmentVisitor::Build(ss, segment_id);
SSExecutionEnginePtr execution_engine_ptr = std::make_shared<ExecutionEngineImpl>(dir_root, seg_visitor);
ExecutionEnginePtr execution_engine_ptr = std::make_shared<ExecutionEngineImpl>(dir_root, seg_visitor);
return execution_engine_ptr;
}
......
......@@ -22,7 +22,7 @@ namespace engine {
class EngineFactory {
public:
static SSExecutionEnginePtr
static ExecutionEnginePtr
Build(const std::string& dir_root, const std::string& collection_name, int64_t segment_id);
};
......
......@@ -45,7 +45,7 @@ class ExecutionEngine {
BuildIndex() = 0;
};
using SSExecutionEnginePtr = std::shared_ptr<ExecutionEngine>;
using ExecutionEnginePtr = std::shared_ptr<ExecutionEngine>;
} // namespace engine
} // namespace milvus
......@@ -28,7 +28,7 @@ namespace engine {
class MemCollection {
public:
using SSMemCollectionFileList = std::vector<MemSegmentPtr>;
using MemCollectionFileList = std::vector<MemSegmentPtr>;
MemCollection(int64_t collection_id, int64_t partition_id, const DBOptions& options);
......@@ -78,7 +78,7 @@ class MemCollection {
int64_t collection_id_;
int64_t partition_id_;
SSMemCollectionFileList mem_segment_list_;
MemCollectionFileList mem_segment_list_;
DBOptions options_;
......@@ -89,7 +89,7 @@ class MemCollection {
std::atomic<uint64_t> lsn_;
}; // SSMemCollection
using SSMemCollectionPtr = std::shared_ptr<MemCollection>;
using MemCollectionPtr = std::shared_ptr<MemCollection>;
} // namespace engine
} // namespace milvus
......@@ -25,7 +25,7 @@ namespace engine {
const char* VECTOR_FIELD = "vector"; // hard code
SSMemCollectionPtr
MemCollectionPtr
MemManagerImpl::GetMemByTable(int64_t collection_id, int64_t partition_id) {
auto mem_collection = mem_map_.find(collection_id);
if (mem_collection != mem_map_.end()) {
......@@ -40,9 +40,9 @@ MemManagerImpl::GetMemByTable(int64_t collection_id, int64_t partition_id) {
return mem;
}
std::vector<SSMemCollectionPtr>
std::vector<MemCollectionPtr>
MemManagerImpl::GetMemByTable(int64_t collection_id) {
std::vector<SSMemCollectionPtr> result;
std::vector<MemCollectionPtr> result;
auto mem_collection = mem_map_.find(collection_id);
if (mem_collection != mem_map_.end()) {
for (auto& pair : mem_collection->second) {
......@@ -156,7 +156,7 @@ MemManagerImpl::ValidateChunk(int64_t collection_id, int64_t partition_id, const
Status
MemManagerImpl::InsertEntitiesNoLock(int64_t collection_id, int64_t partition_id,
const milvus::engine::VectorSourcePtr& source, uint64_t lsn) {
SSMemCollectionPtr mem = GetMemByTable(collection_id, partition_id);
MemCollectionPtr mem = GetMemByTable(collection_id, partition_id);
mem->SetLSN(lsn);
auto status = mem->Add(source);
......@@ -166,7 +166,7 @@ MemManagerImpl::InsertEntitiesNoLock(int64_t collection_id, int64_t partition_id
Status
MemManagerImpl::DeleteEntity(int64_t collection_id, IDNumber vector_id, uint64_t lsn) {
std::unique_lock<std::mutex> lock(mutex_);
std::vector<SSMemCollectionPtr> mems = GetMemByTable(collection_id);
std::vector<MemCollectionPtr> mems = GetMemByTable(collection_id);
for (auto& mem : mems) {
mem->SetLSN(lsn);
......@@ -182,7 +182,7 @@ MemManagerImpl::DeleteEntity(int64_t collection_id, IDNumber vector_id, uint64_t
Status
MemManagerImpl::DeleteEntities(int64_t collection_id, int64_t length, const IDNumber* vector_ids, uint64_t lsn) {
std::unique_lock<std::mutex> lock(mutex_);
std::vector<SSMemCollectionPtr> mems = GetMemByTable(collection_id);
std::vector<MemCollectionPtr> mems = GetMemByTable(collection_id);
for (auto& mem : mems) {
mem->SetLSN(lsn);
......
......@@ -30,9 +30,9 @@ namespace engine {
class MemManagerImpl : public MemManager {
public:
using Ptr = std::shared_ptr<MemManagerImpl>;
using MemPartitionMap = std::map<int64_t, SSMemCollectionPtr>;
using MemPartitionMap = std::map<int64_t, MemCollectionPtr>;
using MemCollectionMap = std::map<int64_t, MemPartitionMap>;
using MemList = std::vector<SSMemCollectionPtr>;
using MemList = std::vector<MemCollectionPtr>;
explicit MemManagerImpl(const DBOptions& options) : options_(options) {
}
......@@ -70,10 +70,10 @@ class MemManagerImpl : public MemManager {
GetCurrentMem() override;
private:
SSMemCollectionPtr
MemCollectionPtr
GetMemByTable(int64_t collection_id, int64_t partition_id);
std::vector<SSMemCollectionPtr>
std::vector<MemCollectionPtr>
GetMemByTable(int64_t collection_id);
Status
......
......@@ -31,7 +31,7 @@ namespace scheduler {
using SegmentSchemaPtr = engine::meta::SegmentSchemaPtr;
using SegmentSchema = engine::meta::SegmentSchema;
using ExecutionEnginePtr = engine::SSExecutionEnginePtr;
using ExecutionEnginePtr = engine::ExecutionEnginePtr;
using EngineFactory = engine::EngineFactory;
using EngineType = engine::EngineType;
using MetricType = engine::MetricType;
......
......@@ -51,7 +51,7 @@ TaskCreator::Create(const DeleteJobPtr& job) {
}
std::vector<TaskPtr>
TaskCreator::Create(const SSSearchJobPtr& job) {
TaskCreator::Create(const SearchJobPtr& job) {
std::vector<TaskPtr> tasks;
for (auto& id : job->segment_ids()) {
auto task = std::make_shared<SearchTask>(job->GetContext(), job->options(), job->query_ptr(), id, nullptr);
......@@ -62,7 +62,7 @@ TaskCreator::Create(const SSSearchJobPtr& job) {
}
std::vector<TaskPtr>
TaskCreator::Create(const SSBuildIndexJobPtr& job) {
TaskCreator::Create(const BuildIndexJobPtr& job) {
std::vector<TaskPtr> tasks;
const std::string& collection_name = job->collection_name();
for (auto& id : job->segment_ids()) {
......
......@@ -39,10 +39,10 @@ class TaskCreator {
Create(const DeleteJobPtr& job);
static std::vector<TaskPtr>
Create(const SSSearchJobPtr& job);
Create(const SearchJobPtr& job);
static std::vector<TaskPtr>
Create(const SSBuildIndexJobPtr& job);
Create(const BuildIndexJobPtr& job);
};
} // namespace scheduler
......
......@@ -77,7 +77,7 @@ class BuildIndexJob : public Job {
std::condition_variable cv_;
};
using SSBuildIndexJobPtr = std::shared_ptr<BuildIndexJob>;
using BuildIndexJobPtr = std::shared_ptr<BuildIndexJob>;
} // namespace scheduler
} // namespace milvus
......@@ -112,7 +112,7 @@ class SearchJob : public Job {
std::condition_variable cv_;
};
using SSSearchJobPtr = std::shared_ptr<SearchJob>;
using SearchJobPtr = std::shared_ptr<SearchJob>;
} // namespace scheduler
} // namespace milvus
......@@ -42,7 +42,7 @@ class BuildIndexTask : public Task {
std::string collection_name_;
engine::snapshot::ID_TYPE segment_id_;
engine::SSExecutionEnginePtr execution_engine_;
engine::ExecutionEnginePtr execution_engine_;
};
} // namespace scheduler
......
......@@ -49,7 +49,7 @@ class SearchTask : public Task {
query::QueryPtr query_ptr_;
engine::snapshot::ID_TYPE segment_id_;
engine::SSExecutionEnginePtr execution_engine_;
engine::ExecutionEnginePtr execution_engine_;
};
} // namespace scheduler
......
......@@ -48,7 +48,7 @@ TEST(JobTest, TestJob) {
// ASSERT_EQ(segment_visitors.size(), 2);
/* create BuildIndexJob */
// milvus::scheduler::SSBuildIndexJobPtr build_index_job =
// milvus::scheduler::BuildIndexJobPtr build_index_job =
// std::make_shared<milvus::scheduler::SSBuildIndexJob>("");
// for (auto& sv : segment_visitors) {
// build_index_job->AddSegmentVisitor(sv);
......@@ -59,7 +59,7 @@ TEST(JobTest, TestJob) {
// build_index_job->WaitFinish();
// /* create SearchJob */
// milvus::scheduler::SSSearchJobPtr search_job =
// milvus::scheduler::SearchJobPtr search_job =
// std::make_shared<milvus::scheduler::SSSearchJob>(nullptr, "", nullptr);
// for (auto& sv : segment_visitors) {
// search_job->AddSegmentVisitor(sv);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册