mirror of https://github.com/milvus-io/milvus.git
parent
b04b3e942c
commit
ad4645fce0
|
@ -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"
|
||||
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
@ -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
|
||||
|
|
|
@ -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…
Reference in New Issue