Commit bfe0af5e authored by peng.xu's avatar peng.xu
Browse files

Merge branch 'branch-0.5.0-yk' into 'branch-0.5.0'

using clang-format-6.0

See merge request megasearch/milvus!677

Former-commit-id: b3036801c168c459204008ade7d11e3ee1463f04
parents a88d830a 3983b9d2
Loading
Loading
Loading
Loading
+66 −67
Original line number Diff line number Diff line
@@ -26,9 +26,9 @@
#include "meta/SqliteMetaImpl.h"
#include "metrics/Metrics.h"
#include "scheduler/SchedInst.h"
#include "scheduler/job/BuildIndexJob.h"
#include "scheduler/job/DeleteJob.h"
#include "scheduler/job/SearchJob.h"
#include "scheduler/job/BuildIndexJob.h"
#include "utils/Log.h"
#include "utils/TimeRecorder.h"

@@ -900,8 +900,7 @@ DBImpl::BackgroundBuildIndex() {
    meta_ptr_->FilesToIndex(to_index_files);
    Status status;

    scheduler::BuildIndexJobPtr
        job = std::make_shared<scheduler::BuildIndexJob>(0, meta_ptr_, options_);
    scheduler::BuildIndexJobPtr job = std::make_shared<scheduler::BuildIndexJob>(0, meta_ptr_, options_);

    // step 2: put build index task to scheduler
    for (auto& file : to_index_files) {
+8 −9
Original line number Diff line number Diff line
@@ -15,12 +15,11 @@
// specific language governing permissions and limitations
// under the License.

#include <src/scheduler/tasklabel/SpecResLabel.h>
#include "scheduler/TaskCreator.h"
#include <src/scheduler/tasklabel/SpecResLabel.h>
#include "SchedInst.h"
#include "scheduler/tasklabel/BroadcastLabel.h"
#include "tasklabel/DefaultLabel.h"
#include "SchedInst.h"


namespace milvus {
namespace scheduler {
+1 −1
Original line number Diff line number Diff line
@@ -30,9 +30,9 @@
#include "job/DeleteJob.h"
#include "job/Job.h"
#include "job/SearchJob.h"
#include "task/BuildIndexTask.h"
#include "task/DeleteTask.h"
#include "task/SearchTask.h"
#include "task/BuildIndexTask.h"
#include "task/Task.h"

namespace milvus {
+15 −16
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@
#include "src/cache/GpuCacheMgr.h"
#include "src/server/Config.h"


namespace milvus {
namespace scheduler {

@@ -175,8 +174,8 @@ Action::SpecifiedResourceLabelTaskScheduler(ResourceMgrWPtr res_mgr, ResourcePtr
            bool find_gpu_res = false;
            for (uint64_t i = 0; i < compute_resources.size(); ++i) {
                if (res_mgr.lock()->GetResource(ResourceType::GPU, build_index_gpu) != nullptr) {
                    if (compute_resources[i]->name()
                        == res_mgr.lock()->GetResource(ResourceType::GPU, build_index_gpu)->name()) {
                    if (compute_resources[i]->name() ==
                        res_mgr.lock()->GetResource(ResourceType::GPU, build_index_gpu)->name()) {
                        find_gpu_res = true;
                        Path task_path(paths[i], paths[i].size() - 1);
                        task->path() = task_path;
+4 −2
Original line number Diff line number Diff line
@@ -15,9 +15,11 @@
// specific language governing permissions and limitations
// under the License.

#include "BuildIndexJob.h"
#include "scheduler/job/BuildIndexJob.h"
#include "utils/Log.h"

#include <utility>

namespace milvus {
namespace scheduler {

Loading