Lines Matching refs:cfd
332 for (auto cfd : *versions_->GetColumnFamilySet()) { in ResumeImpl()
333 if (cfd->IsDropped()) { in ResumeImpl()
336 cfd->Ref(); in ResumeImpl()
338 s = FlushMemTable(cfd, flush_opts, FlushReason::kErrorRecovery); in ResumeImpl()
340 cfd->UnrefAndTryDelete(); in ResumeImpl()
376 for (auto cfd : *versions_->GetColumnFamilySet()) { in ResumeImpl()
377 SchedulePendingCompaction(cfd); in ResumeImpl()
422 for (auto cfd : *versions_->GetColumnFamilySet()) { in CancelAllBackgroundWork()
423 if (!cfd->IsDropped() && cfd->initialized() && !cfd->mem()->IsEmpty()) { in CancelAllBackgroundWork()
424 cfd->Ref(); in CancelAllBackgroundWork()
426 FlushMemTable(cfd, FlushOptions(), FlushReason::kShutDown); in CancelAllBackgroundWork()
428 cfd->UnrefAndTryDelete(); in CancelAllBackgroundWork()
489 auto cfd = PopFirstFromCompactionQueue(); in CloseHelper() local
490 cfd->UnrefAndTryDelete(); in CloseHelper()
839 for (auto cfd : *versions_->GetColumnFamilySet()) { in DumpStats()
840 if (cfd->initialized()) { in DumpStats()
841 cfd->internal_stats()->GetStringProperty( in DumpStats()
845 for (auto cfd : *versions_->GetColumnFamilySet()) { in DumpStats()
846 if (cfd->initialized()) { in DumpStats()
847 cfd->internal_stats()->GetStringProperty( in DumpStats()
876 ColumnFamilyData* cfd = cfh->cfd(); in TablesRangeTombstoneSummary() local
878 SuperVersion* super_version = cfd->GetReferencedSuperVersion(this); in TablesRangeTombstoneSummary()
897 FSDirectory* DBImpl::GetDataDir(ColumnFamilyData* cfd, size_t path_id) const { in GetDataDir() argument
898 assert(cfd); in GetDataDir()
899 FSDirectory* ret_dir = cfd->GetDataDir(path_id); in GetDataDir()
914 auto* cfd = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family)->cfd(); in SetOptions()
918 cfd->GetName().c_str()); in SetOptions()
929 s = cfd->SetOptions(db_options, options_map); in SetOptions()
931 new_options = *cfd->GetLatestMutableCFOptions(); in SetOptions()
934 versions_->LogAndApply(cfd, new_options, &dummy_edit, &mutex_, in SetOptions()
939 InstallSuperVersionAndScheduleWork(cfd, &sv_context, new_options); in SetOptions()
950 "SetOptions() on column family [%s], inputs:", cfd->GetName().c_str()); in SetOptions()
957 "[%s] SetOptions() succeeded", cfd->GetName().c_str()); in SetOptions()
964 cfd->GetName().c_str()); in SetOptions()
1134 ColumnFamilyData* cfd, const MutableCFOptions& /*mutable_cf_options*/, in FindMinimumEmptyLevelFitting() argument
1137 const auto* vstorage = cfd->current()->storage_info(); in FindMinimumEmptyLevelFitting()
1317 ColumnFamilyData* cfd; in NewInternalIterator() local
1319 cfd = default_cf_handle_->cfd(); in NewInternalIterator()
1322 cfd = cfh->cfd(); in NewInternalIterator()
1326 SuperVersion* super_version = cfd->GetSuperVersion()->Ref(); in NewInternalIterator()
1329 return NewInternalIterator(roptions, cfd, super_version, arena, range_del_agg, in NewInternalIterator()
1449 ColumnFamilyData* cfd, in NewInternalIterator() argument
1459 &cfd->internal_comparator(), arena, in NewInternalIterator()
1536 auto cfd = cfh->cfd(); in GetImpl() local
1548 SuperVersion* sv = GetAndRefSuperVersion(cfd); in GetImpl()
1648 ReturnAndCleanupSuperVersion(cfd, sv); in GetImpl()
1668 ReturnAndCleanupSuperVersion(cfd, sv); in GetImpl()
1723 auto cfd = cfh->cfd(); in MultiGet() local
1724 if (multiget_cf_data.find(cfd->GetID()) == multiget_cf_data.end()) { in MultiGet()
1725 multiget_cf_data.emplace(cfd->GetID(), in MultiGet()
1770 auto mgd_iter = multiget_cf_data.find(cfh->cfd()->GetID()); in MultiGet()
1813 ReturnAndCleanupSuperVersion(mgd.cfd, mgd.super_version); in MultiGet()
1815 mgd.cfd->GetSuperVersion()->Unref(); in MultiGet()
1843 node->super_version = GetAndRefSuperVersion(node->cfd); in MultiCFSnapshot()
1888 ColumnFamilyData* cfd = node->cfd; in MultiCFSnapshot() local
1890 ReturnAndCleanupSuperVersion(cfd, super_version); in MultiCFSnapshot()
1913 node->super_version = GetAndRefSuperVersion(node->cfd); in MultiCFSnapshot()
1915 node->super_version = node->cfd->GetSuperVersion()->Ref(); in MultiCFSnapshot()
2018 ReturnAndCleanupSuperVersion(cf_iter->cfd, cf_iter->super_version); in MultiGet()
2020 cf_iter->cfd->GetSuperVersion()->Unref(); in MultiGet()
2031 uint32_t cfd_id1 = cfh->cfd()->GetID(); in operator ()()
2032 const Comparator* comparator = cfh->cfd()->user_comparator(); in operator ()()
2034 uint32_t cfd_id2 = cfh->cfd()->GetID(); in operator ()()
2064 uint32_t cfd_id1 = cfh->cfd()->GetID(); in PrepareMultiGetKeys()
2065 const Comparator* comparator = cfh->cfd()->user_comparator(); in PrepareMultiGetKeys()
2067 uint32_t cfd_id2 = cfh->cfd()->GetID(); in PrepareMultiGetKeys()
2164 ReturnAndCleanupSuperVersion(multiget_cf_data[0].cfd, in MultiGetWithCallback()
2359 auto* cfd = in CreateColumnFamilyImpl() local
2361 assert(cfd != nullptr); in CreateColumnFamilyImpl()
2363 s = cfd->AddDirectories(&dummy_created_dirs); in CreateColumnFamilyImpl()
2367 auto* cfd = in CreateColumnFamilyImpl() local
2369 assert(cfd != nullptr); in CreateColumnFamilyImpl()
2370 InstallSuperVersionAndScheduleWork(cfd, &sv_context, in CreateColumnFamilyImpl()
2371 *cfd->GetLatestMutableCFOptions()); in CreateColumnFamilyImpl()
2373 if (!cfd->mem()->IsSnapshotSupported()) { in CreateColumnFamilyImpl()
2377 cfd->set_initialized(); in CreateColumnFamilyImpl()
2379 *handle = new ColumnFamilyHandleImpl(cfd, this, &mutex_); in CreateColumnFamilyImpl()
2382 column_family_name.c_str(), (unsigned)cfd->GetID()); in CreateColumnFamilyImpl()
2394 reinterpret_cast<ColumnFamilyHandleImpl*>(*handle)->cfd()); in CreateColumnFamilyImpl()
2432 auto cfd = cfh->cfd(); in DropColumnFamilyImpl() local
2433 if (cfd->GetID() == 0) { in DropColumnFamilyImpl()
2437 bool cf_support_snapshot = cfd->mem()->IsSnapshotSupported(); in DropColumnFamilyImpl()
2441 edit.SetColumnFamily(cfd->GetID()); in DropColumnFamilyImpl()
2446 if (cfd->IsDropped()) { in DropColumnFamilyImpl()
2453 s = versions_->LogAndApply(cfd, *cfd->GetLatestMutableCFOptions(), &edit, in DropColumnFamilyImpl()
2458 auto* mutable_cf_options = cfd->GetLatestMutableCFOptions(); in DropColumnFamilyImpl()
2482 EraseThreadStatusCfInfo(cfd); in DropColumnFamilyImpl()
2483 assert(cfd->IsDropped()); in DropColumnFamilyImpl()
2485 "Dropped column family with id %u\n", cfd->GetID()); in DropColumnFamilyImpl()
2489 cfd->GetID(), s.ToString().c_str()); in DropColumnFamilyImpl()
2542 auto cfd = cfh->cfd(); in NewIterator() local
2550 SuperVersion* sv = cfd->GetReferencedSuperVersion(this); in NewIterator()
2551 auto iter = new ForwardIterator(this, read_options, cfd, sv); in NewIterator()
2553 env_, read_options, *cfd->ioptions(), sv->mutable_cf_options, in NewIterator()
2554 cfd->user_comparator(), iter, kMaxSequenceNumber, in NewIterator()
2556 this, cfd); in NewIterator()
2565 result = NewIteratorImpl(read_options, cfd, snapshot, read_callback); in NewIterator()
2571 ColumnFamilyData* cfd, in NewIteratorImpl() argument
2576 SuperVersion* sv = cfd->GetReferencedSuperVersion(this); in NewIteratorImpl()
2621 env_, read_options, *cfd->ioptions(), sv->mutable_cf_options, snapshot, in NewIteratorImpl()
2623 sv->version_number, read_callback, this, cfd, allow_blob, in NewIteratorImpl()
2627 NewInternalIterator(read_options, cfd, sv, db_iter->GetArena(), in NewIteratorImpl()
2654 auto cfd = reinterpret_cast<ColumnFamilyHandleImpl*>(cfh)->cfd(); in NewIterators()
2655 SuperVersion* sv = cfd->GetReferencedSuperVersion(this); in NewIterators()
2656 auto iter = new ForwardIterator(this, read_options, cfd, sv); in NewIterators()
2658 env_, read_options, *cfd->ioptions(), sv->mutable_cf_options, in NewIterators()
2659 cfd->user_comparator(), iter, kMaxSequenceNumber, in NewIterators()
2661 read_callback, this, cfd)); in NewIterators()
2672 auto* cfd = in NewIterators() local
2673 reinterpret_cast<ColumnFamilyHandleImpl*>(column_families[i])->cfd(); in NewIterators()
2675 NewIteratorImpl(read_options, cfd, snapshot, read_callback)); in NewIterators()
2720 bool CfdListContains(const CfdList& list, ColumnFamilyData* cfd) { in CfdListContains() argument
2722 if (t == cfd) { in CfdListContains()
2747 for (auto* cfd : *versions_->GetColumnFamilySet()) { in ReleaseSnapshot()
2748 cfd->current()->storage_info()->UpdateOldestSnapshot(oldest_snapshot); in ReleaseSnapshot()
2749 if (!cfd->current() in ReleaseSnapshot()
2753 SchedulePendingCompaction(cfd); in ReleaseSnapshot()
2755 cf_scheduled.push_back(cfd); in ReleaseSnapshot()
2763 for (auto* cfd : *versions_->GetColumnFamilySet()) { in ReleaseSnapshot()
2764 if (CfdListContains(cf_scheduled, cfd)) { in ReleaseSnapshot()
2769 cfd->current()->storage_info()->bottommost_files_mark_threshold()); in ReleaseSnapshot()
2781 auto cfd = cfh->cfd(); in GetPropertiesOfAllTables() local
2785 auto version = cfd->current(); in GetPropertiesOfAllTables()
2803 auto cfd = cfh->cfd(); in GetPropertiesOfTablesInRange() local
2807 auto version = cfd->current(); in GetPropertiesOfTablesInRange()
2840 cfh->cfd()->GetLatestCFOptions()); in GetOptions()
2852 auto cfd = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family)->cfd(); in GetProperty() local
2858 GetIntPropertyInternal(cfd, *property_info, false, &int_value); in GetProperty()
2865 return cfd->internal_stats()->GetStringProperty(*property_info, property, in GetProperty()
2886 auto cfd = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family)->cfd(); in GetMapProperty() local
2891 return cfd->internal_stats()->GetMapProperty(*property_info, property, in GetMapProperty()
2905 auto cfd = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family)->cfd(); in GetIntProperty() local
2906 return GetIntPropertyInternal(cfd, *property_info, false, value); in GetIntProperty()
2909 bool DBImpl::GetIntPropertyInternal(ColumnFamilyData* cfd, in GetIntPropertyInternal() argument
2916 return cfd->internal_stats()->GetIntProperty(property_info, value, this); in GetIntPropertyInternal()
2919 return cfd->internal_stats()->GetIntProperty(property_info, value, this); in GetIntPropertyInternal()
2924 sv = GetAndRefSuperVersion(cfd); in GetIntPropertyInternal()
2926 sv = cfd->GetSuperVersion(); in GetIntPropertyInternal()
2929 bool ret = cfd->internal_stats()->GetIntPropertyOutOfMutex( in GetIntPropertyInternal()
2933 ReturnAndCleanupSuperVersion(cfd, sv); in GetIntPropertyInternal()
2953 for (auto* cfd : *versions_->GetColumnFamilySet()) { in ResetStats()
2954 if (cfd->initialized()) { in ResetStats()
2955 cfd->internal_stats()->Clear(); in ResetStats()
2974 for (auto* cfd : *versions_->GetColumnFamilySet()) { in GetAggregatedIntProperty()
2975 if (!cfd->initialized()) { in GetAggregatedIntProperty()
2978 if (GetIntPropertyInternal(cfd, *property_info, true, &value)) { in GetAggregatedIntProperty()
2989 SuperVersion* DBImpl::GetAndRefSuperVersion(ColumnFamilyData* cfd) { in GetAndRefSuperVersion() argument
2991 return cfd->GetThreadLocalSuperVersion(this); in GetAndRefSuperVersion()
2998 auto cfd = column_family_set->GetColumnFamily(column_family_id); in GetAndRefSuperVersion() local
2999 if (!cfd) { in GetAndRefSuperVersion()
3003 return GetAndRefSuperVersion(cfd); in GetAndRefSuperVersion()
3027 void DBImpl::ReturnAndCleanupSuperVersion(ColumnFamilyData* cfd, in ReturnAndCleanupSuperVersion() argument
3029 if (!cfd->ReturnThreadLocalSuperVersion(sv)) { in ReturnAndCleanupSuperVersion()
3038 auto cfd = column_family_set->GetColumnFamily(column_family_id); in ReturnAndCleanupSuperVersion() local
3042 assert(cfd != nullptr); in ReturnAndCleanupSuperVersion()
3043 ReturnAndCleanupSuperVersion(cfd, sv); in ReturnAndCleanupSuperVersion()
3063 auto* cfd = in GetColumnFamilyHandleUnlocked() local
3065 if (cfd == nullptr) { in GetColumnFamilyHandleUnlocked()
3070 new ColumnFamilyHandleImpl(cfd, this, &mutex_)); in GetColumnFamilyHandleUnlocked()
3079 ColumnFamilyData* cfd = cfh->cfd(); in GetApproximateMemTableStats() local
3080 SuperVersion* sv = GetAndRefSuperVersion(cfd); in GetApproximateMemTableStats()
3092 ReturnAndCleanupSuperVersion(cfd, sv); in GetApproximateMemTableStats()
3104 auto cfd = cfh->cfd(); in GetApproximateSizes() local
3105 SuperVersion* sv = GetAndRefSuperVersion(cfd); in GetApproximateSizes()
3124 ReturnAndCleanupSuperVersion(cfd, sv); in GetApproximateSizes()
3189 ColumnFamilyData* cfd; in DeleteFile() local
3194 status = versions_->GetMetadataForFile(number, &level, &metadata, &cfd); in DeleteFile()
3201 assert(level < cfd->NumberLevels()); in DeleteFile()
3215 auto* vstoreage = cfd->current()->storage_info(); in DeleteFile()
3216 for (int i = level + 1; i < cfd->NumberLevels(); i++) { in DeleteFile()
3235 edit.SetColumnFamily(cfd->GetID()); in DeleteFile()
3237 status = versions_->LogAndApply(cfd, *cfd->GetLatestMutableCFOptions(), in DeleteFile()
3240 InstallSuperVersionAndScheduleWork(cfd, in DeleteFile()
3242 *cfd->GetLatestMutableCFOptions()); in DeleteFile()
3262 ColumnFamilyData* cfd = cfh->cfd(); in DeleteFilesInRanges() local
3268 Version* input_version = cfd->current(); in DeleteFilesInRanges()
3273 for (int i = 1; i < cfd->NumberLevels(); i++) { in DeleteFilesInRanges()
3306 cfd->user_comparator()->Compare(level_file->largest.user_key(), in DeleteFilesInRanges()
3310 edit.SetColumnFamily(cfd->GetID()); in DeleteFilesInRanges()
3322 status = versions_->LogAndApply(cfd, *cfd->GetLatestMutableCFOptions(), in DeleteFilesInRanges()
3325 InstallSuperVersionAndScheduleWork(cfd, in DeleteFilesInRanges()
3327 *cfd->GetLatestMutableCFOptions()); in DeleteFilesInRanges()
3354 auto* cfd = reinterpret_cast<ColumnFamilyHandleImpl*>(column_family)->cfd(); in GetColumnFamilyMetaData() local
3355 auto* sv = GetAndRefSuperVersion(cfd); in GetColumnFamilyMetaData()
3369 ReturnAndCleanupSuperVersion(cfd, sv); in GetColumnFamilyMetaData()
3668 for (auto cfd : *versions_->GetColumnFamilySet()) { in WriteOptionsFile()
3669 if (cfd->IsDropped()) { in WriteOptionsFile()
3672 cf_names.push_back(cfd->GetName()); in WriteOptionsFile()
3673 cf_opts.push_back(cfd->GetLatestCFOptions()); in WriteOptionsFile()
3792 void DBImpl::NewThreadStatusCfInfo(ColumnFamilyData* cfd) const { in NewThreadStatusCfInfo()
3794 ThreadStatusUtil::NewColumnFamilyInfo(this, cfd, cfd->GetName(), in NewThreadStatusCfInfo()
3795 cfd->ioptions()->env); in NewThreadStatusCfInfo()
3799 void DBImpl::EraseThreadStatusCfInfo(ColumnFamilyData* cfd) const { in EraseThreadStatusCfInfo()
3801 ThreadStatusUtil::EraseColumnFamilyInfo(cfd); in EraseThreadStatusCfInfo()
4022 static_cast<ColumnFamilyHandleImpl*>(args[0].column_family)->cfd(), total, in IngestExternalFiles()
4032 auto* cfd = static_cast<ColumnFamilyHandleImpl*>(arg.column_family)->cfd(); in IngestExternalFiles() local
4034 env_, versions_.get(), cfd, immutable_db_options_, file_options_, in IngestExternalFiles()
4045 auto* cfd = in IngestExternalFiles() local
4046 static_cast<ColumnFamilyHandleImpl*>(args[i].column_family)->cfd(); in IngestExternalFiles()
4047 SuperVersion* super_version = cfd->GetReferencedSuperVersion(this); in IngestExternalFiles()
4056 auto* cfd = in IngestExternalFiles() local
4057 static_cast<ColumnFamilyHandleImpl*>(args[0].column_family)->cfd(); in IngestExternalFiles()
4058 SuperVersion* super_version = cfd->GetReferencedSuperVersion(this); in IngestExternalFiles()
4113 auto* cfd = in IngestExternalFiles() local
4114 static_cast<ColumnFamilyHandleImpl*>(args[i].column_family)->cfd(); in IngestExternalFiles()
4115 if (cfd->IsDropped()) { in IngestExternalFiles()
4123 status = ingestion_jobs[i].NeedsFlush(&tmp, cfd->GetSuperVersion()); in IngestExternalFiles()
4148 auto* cfd = in IngestExternalFiles() local
4150 ->cfd(); in IngestExternalFiles()
4151 status = FlushMemTable(cfd, flush_opts, in IngestExternalFiles()
4193 auto* cfd = in IngestExternalFiles() local
4194 static_cast<ColumnFamilyHandleImpl*>(args[i].column_family)->cfd(); in IngestExternalFiles()
4195 if (cfd->IsDropped()) { in IngestExternalFiles()
4198 cfds_to_commit.push_back(cfd); in IngestExternalFiles()
4199 mutable_cf_options_list.push_back(cfd->GetLatestMutableCFOptions()); in IngestExternalFiles()
4221 auto* cfd = in IngestExternalFiles() local
4222 static_cast<ColumnFamilyHandleImpl*>(args[i].column_family)->cfd(); in IngestExternalFiles()
4223 if (!cfd->IsDropped()) { in IngestExternalFiles()
4224 InstallSuperVersionAndScheduleWork(cfd, &sv_ctxs[i], in IngestExternalFiles()
4225 *cfd->GetLatestMutableCFOptions()); in IngestExternalFiles()
4267 auto* cfd = in IngestExternalFiles() local
4268 static_cast<ColumnFamilyHandleImpl*>(args[i].column_family)->cfd(); in IngestExternalFiles()
4269 if (!cfd->IsDropped()) { in IngestExternalFiles()
4270 NotifyOnExternalFileIngested(cfd, ingestion_jobs[i]); in IngestExternalFiles()
4296 auto cfd = cfh->cfd(); in CreateColumnFamilyWithImport() local
4297 ImportColumnFamilyJob import_job(env_, versions_.get(), cfd, in CreateColumnFamilyWithImport()
4323 auto cf_options = cfd->GetLatestMutableCFOptions(); in CreateColumnFamilyWithImport()
4324 status = versions_->LogAndApply(cfd, *cf_options, &dummy_edit, &mutex_, in CreateColumnFamilyWithImport()
4327 InstallSuperVersionAndScheduleWork(cfd, &dummy_sv_ctx, *cf_options); in CreateColumnFamilyWithImport()
4334 SuperVersion* sv = cfd->GetReferencedSuperVersion(this); in CreateColumnFamilyWithImport()
4354 assert(!cfd->IsDropped()); in CreateColumnFamilyWithImport()
4359 auto cf_options = cfd->GetLatestMutableCFOptions(); in CreateColumnFamilyWithImport()
4360 status = versions_->LogAndApply(cfd, *cf_options, import_job.edit(), in CreateColumnFamilyWithImport()
4363 InstallSuperVersionAndScheduleWork(cfd, &sv_context, *cf_options); in CreateColumnFamilyWithImport()
4402 for (auto cfd : *versions_->GetColumnFamilySet()) { in VerifyChecksum()
4403 if (!cfd->IsDropped() && cfd->initialized()) { in VerifyChecksum()
4404 cfd->Ref(); in VerifyChecksum()
4405 cfd_list.push_back(cfd); in VerifyChecksum()
4410 for (auto cfd : cfd_list) { in VerifyChecksum() local
4411 sv_list.push_back(cfd->GetReferencedSuperVersion(this)); in VerifyChecksum()
4415 ColumnFamilyData* cfd = sv->current->cfd(); in VerifyChecksum() local
4420 cfd->GetLatestCFOptions()); in VerifyChecksum()
4426 std::string fname = TableFileName(cfd->ioptions()->cf_paths, in VerifyChecksum()
4453 for (auto cfd : cfd_list) { in VerifyChecksum() local
4454 cfd->UnrefAndTryDelete(); in VerifyChecksum()
4461 ColumnFamilyData* cfd, const ExternalSstFileIngestionJob& ingestion_job) { in NotifyOnExternalFileIngested() argument
4468 info.cf_name = cfd->GetName(); in NotifyOnExternalFileIngested()
4541 ColumnFamilyData* cfd, uint64_t num, in ReserveFileNumbersBeforeIngestion() argument
4555 auto cf_options = cfd->GetLatestMutableCFOptions(); in ReserveFileNumbersBeforeIngestion()
4561 s = versions_->LogAndApply(cfd, *cf_options, &dummy_edit, &mutex_, in ReserveFileNumbersBeforeIngestion()
4564 InstallSuperVersionAndScheduleWork(cfd, &dummy_sv_ctx, *cf_options); in ReserveFileNumbersBeforeIngestion()
4573 for (auto cfd : *versions_->GetColumnFamilySet()) { in GetCreationTimeOfOldestFile()
4574 if (!cfd->IsDropped()) { in GetCreationTimeOfOldestFile()
4577 SuperVersion* sv = GetAndRefSuperVersion(cfd); in GetCreationTimeOfOldestFile()
4580 ReturnAndCleanupSuperVersion(cfd, sv); in GetCreationTimeOfOldestFile()