Commit 095b1243 authored by groot's avatar groot
Browse files

add more log

parent cc5c0bf2
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -849,15 +849,16 @@ DBImpl::BackgroundBuildIndex() {
        status = ongoing_files_checker_.MarkOngoingFiles(to_index_files);

        // step 2: put build index task to scheduler
        std::map<scheduler::BuildIndexJobPtr, scheduler::TableFileSchemaPtr> job2file_map;
        std::vector<std::pair<scheduler::BuildIndexJobPtr, scheduler::TableFileSchemaPtr>> job2file_map;
        for (auto& file : to_index_files) {
            scheduler::BuildIndexJobPtr job = std::make_shared<scheduler::BuildIndexJob>(meta_ptr_, options_);
            scheduler::TableFileSchemaPtr file_ptr = std::make_shared<meta::TableFileSchema>(file);
            job->AddToIndexFiles(file_ptr);
            scheduler::JobMgrInst::GetInstance()->Put(job);
            job2file_map.insert(std::make_pair(job, file_ptr));
            job2file_map.push_back(std::make_pair(job, file_ptr));
        }

        // step 3: wait build index finished and mark failed files
        for (auto iter = job2file_map.begin(); iter != job2file_map.end(); ++iter) {
            scheduler::BuildIndexJobPtr job = iter->first;
            meta::TableFileSchema& file_schema = *(iter->second.get());
+6 −2
Original line number Diff line number Diff line
@@ -1817,6 +1817,8 @@ MySQLMetaImpl::CleanUpCacheWithTTL(uint64_t seconds, const Table2FileIDs& ignore
            auto iter = ignore_files.find(table_file.table_id_);
            if (iter != ignore_files.end()) {
                if (iter->second.find(table_file.file_id_) != iter->second.end()) {
                    ENGINE_LOG_DEBUG << "File:" << table_file.file_id_
                                     << " currently is in use, not able to erase from cache now";
                    continue;  // ignore this file, don't delete it
                }
            }
@@ -1870,6 +1872,8 @@ MySQLMetaImpl::CleanUpFilesWithTTL(uint64_t seconds, const Table2FileIDs& ignore
                auto iter = ignore_files.find(table_file.table_id_);
                if (iter != ignore_files.end()) {
                    if (iter->second.find(table_file.file_id_) != iter->second.end()) {
                        ENGINE_LOG_DEBUG << "File:" << table_file.file_id_
                                         << " currently is in use, not able to delete now";
                        continue;  // ignore this file, don't delete it
                    }
                }
+4 −0
Original line number Diff line number Diff line
@@ -1331,6 +1331,8 @@ SqliteMetaImpl::CleanUpCacheWithTTL(uint64_t seconds, const Table2FileIDs& ignor
            auto iter = ignore_files.find(table_file.table_id_);
            if (iter != ignore_files.end()) {
                if (iter->second.find(table_file.file_id_) != iter->second.end()) {
                    ENGINE_LOG_DEBUG << "File:" << table_file.file_id_
                                     << " currently is in use, not able to erase from cache now";
                    continue; // ignore this file, don't delete it
                }
            }
@@ -1383,6 +1385,8 @@ SqliteMetaImpl::CleanUpFilesWithTTL(uint64_t seconds, const Table2FileIDs& ignor
                auto iter = ignore_files.find(table_file.table_id_);
                if (iter != ignore_files.end()) {
                    if (iter->second.find(table_file.file_id_) != iter->second.end()) {
                        ENGINE_LOG_DEBUG << "File:" << table_file.file_id_
                                         << " currently is in use, not able to delete now";
                        continue; // ignore this file, don't delete it
                    }
                }