From 4862720e08530b42354b328bfd1f6b962d9bedd5 Mon Sep 17 00:00:00 2001 From: DorianZheng Date: Tue, 11 Dec 2018 20:25:45 -0800 Subject: [PATCH] Expose column family id to `FlushJobInfo` Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/4772 Differential Revision: D13428923 Pulled By: ajkr fbshipit-source-id: e351e9c5eea97816db25429e129357a8af90712a --- db/db_impl_compaction_flush.cc | 2 ++ include/rocksdb/listener.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/db/db_impl_compaction_flush.cc b/db/db_impl_compaction_flush.cc index fa0b91877..1c32ec675 100644 --- a/db/db_impl_compaction_flush.cc +++ b/db/db_impl_compaction_flush.cc @@ -479,6 +479,7 @@ void DBImpl::NotifyOnFlushBegin(ColumnFamilyData* cfd, FileMetaData* file_meta, mutex_.Unlock(); { FlushJobInfo info; + info.cf_id = cfd->GetID(); info.cf_name = cfd->GetName(); // TODO(yhchiang): make db_paths dynamic in case flush does not // go to L0 in the future. @@ -530,6 +531,7 @@ void DBImpl::NotifyOnFlushCompleted(ColumnFamilyData* cfd, mutex_.Unlock(); { FlushJobInfo info; + info.cf_id = cfd->GetID(); info.cf_name = cfd->GetName(); // TODO(yhchiang): make db_paths dynamic in case flush does not // go to L0 in the future. diff --git a/include/rocksdb/listener.h b/include/rocksdb/listener.h index 8ceb2ed4c..e39d7c347 100644 --- a/include/rocksdb/listener.h +++ b/include/rocksdb/listener.h @@ -154,6 +154,8 @@ struct FileOperationInfo { }; struct FlushJobInfo { + // the id of the column family + uint32_t cf_id; // the name of the column family std::string cf_name; // the path to the newly created file