Loading core/src/db/DBImpl.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include "meta/MetaFactory.h" #include "meta/SqliteMetaImpl.h" #include "metrics/Metrics.h" #include "scheduler/Definition.h" #include "scheduler/SchedInst.h" #include "scheduler/job/BuildIndexJob.h" #include "scheduler/job/DeleteJob.h" Loading Loading @@ -1214,6 +1215,13 @@ DBImpl::QueryAsync(const std::shared_ptr<server::Context>& context, const meta:: milvus::server::ContextChild tracer(context, "Query Async"); server::CollectQueryMetrics metrics(vectors.vector_count_); if (files.size() > milvus::scheduler::TASK_TABLE_MAX_COUNT) { std::string msg = "Search files count exceed scheduler limit: " + std::to_string(milvus::scheduler::TASK_TABLE_MAX_COUNT); ENGINE_LOG_ERROR << msg; return Status(DB_ERROR, msg); } TimeRecorder rc(""); // step 1: construct search job Loading core/src/scheduler/Definition.h +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ // Unless required by applicable law or agreed to in writing, software distributed under the License // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express // or implied. See the License for the specific language governing permissions and limitations under the License. #pragma once #include <condition_variable> #include <deque> Loading Loading @@ -35,5 +36,7 @@ using EngineFactory = engine::EngineFactory; using EngineType = engine::EngineType; using MetricType = engine::MetricType; constexpr uint64_t TASK_TABLE_MAX_COUNT = 1ULL << 16ULL; } // namespace scheduler } // namespace milvus core/src/scheduler/TaskTable.h +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ struct TaskTableItem : public interface::dumpable { class TaskTable : public interface::dumpable { public: TaskTable() : table_(1ULL << 16ULL) { TaskTable() : table_(TASK_TABLE_MAX_COUNT) { } TaskTable(const TaskTable&) = delete; Loading Loading
core/src/db/DBImpl.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -36,6 +36,7 @@ #include "meta/MetaFactory.h" #include "meta/SqliteMetaImpl.h" #include "metrics/Metrics.h" #include "scheduler/Definition.h" #include "scheduler/SchedInst.h" #include "scheduler/job/BuildIndexJob.h" #include "scheduler/job/DeleteJob.h" Loading Loading @@ -1214,6 +1215,13 @@ DBImpl::QueryAsync(const std::shared_ptr<server::Context>& context, const meta:: milvus::server::ContextChild tracer(context, "Query Async"); server::CollectQueryMetrics metrics(vectors.vector_count_); if (files.size() > milvus::scheduler::TASK_TABLE_MAX_COUNT) { std::string msg = "Search files count exceed scheduler limit: " + std::to_string(milvus::scheduler::TASK_TABLE_MAX_COUNT); ENGINE_LOG_ERROR << msg; return Status(DB_ERROR, msg); } TimeRecorder rc(""); // step 1: construct search job Loading
core/src/scheduler/Definition.h +3 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ // Unless required by applicable law or agreed to in writing, software distributed under the License // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express // or implied. See the License for the specific language governing permissions and limitations under the License. #pragma once #include <condition_variable> #include <deque> Loading Loading @@ -35,5 +36,7 @@ using EngineFactory = engine::EngineFactory; using EngineType = engine::EngineType; using MetricType = engine::MetricType; constexpr uint64_t TASK_TABLE_MAX_COUNT = 1ULL << 16ULL; } // namespace scheduler } // namespace milvus
core/src/scheduler/TaskTable.h +1 −1 Original line number Diff line number Diff line Loading @@ -97,7 +97,7 @@ struct TaskTableItem : public interface::dumpable { class TaskTable : public interface::dumpable { public: TaskTable() : table_(1ULL << 16ULL) { TaskTable() : table_(TASK_TABLE_MAX_COUNT) { } TaskTable(const TaskTable&) = delete; Loading