From 18005fdeb70066452636e6da3e906e65c9fec4a3 Mon Sep 17 00:00:00 2001 From: Lizhe Ji Date: Mon, 15 Jun 2026 11:03:50 -0700 Subject: [PATCH 1/2] Add metadata_dim_ and total_rows_written_ members to EmbeddingRocksDB (#5883) Summary: X-link: https://github.com/facebookresearch/FBGEMM/pull/2802 Declare two new EmbeddingRocksDB member fields used by the metadata column family feature later in the stack: - metadata_dim_: width of the metaheader stored in the separate metadata CF - total_rows_written_: cumulative count of rows written Reviewed By: EddyLXJ Differential Revision: D108342270 --- .../ssd_split_embeddings_cache/ssd_table_batched_embeddings.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fbgemm_gpu/src/ssd_split_embeddings_cache/ssd_table_batched_embeddings.h b/fbgemm_gpu/src/ssd_split_embeddings_cache/ssd_table_batched_embeddings.h index 6539992ab6..8ea3f82a25 100644 --- a/fbgemm_gpu/src/ssd_split_embeddings_cache/ssd_table_batched_embeddings.h +++ b/fbgemm_gpu/src/ssd_split_embeddings_cache/ssd_table_batched_embeddings.h @@ -1396,10 +1396,12 @@ class EmbeddingRocksDB : public kv_db::EmbeddingKVDB { std::atomic fwd_l1_eviction_dur_{0}; std::atomic bwd_l1_cnflct_miss_write_back_dur_{0}; std::atomic flush_write_dur_{0}; + std::atomic total_rows_written_{0}; // cumulative actual rows written std::unordered_map> snapshots_; int64_t max_D_; + int64_t metadata_dim_; int64_t elem_size_; std::vector sub_table_dims_; std::vector sub_table_hash_cumsum_; From 581a46b91de1649e41bb88aaea1acd1e50e83c7a Mon Sep 17 00:00:00 2001 From: Lizhe Ji Date: Mon, 15 Jun 2026 11:03:50 -0700 Subject: [PATCH 2/2] Add metadata column family fields to EmbeddingRocksDB (#5890) Summary: Declare the metadata column family member fields (metadata_cf_handles_, cf_options_) and add the required includes. These are used by the metadata methods and existing-method wiring that follow in the stack. Differential Revision: D108357928 --- .../ssd_split_embeddings_cache/ssd_table_batched_embeddings.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fbgemm_gpu/src/ssd_split_embeddings_cache/ssd_table_batched_embeddings.h b/fbgemm_gpu/src/ssd_split_embeddings_cache/ssd_table_batched_embeddings.h index 8ea3f82a25..99af7d7d9e 100644 --- a/fbgemm_gpu/src/ssd_split_embeddings_cache/ssd_table_batched_embeddings.h +++ b/fbgemm_gpu/src/ssd_split_embeddings_cache/ssd_table_batched_embeddings.h @@ -9,6 +9,8 @@ #pragma once #include +#include +#include #include #include @@ -1376,11 +1378,13 @@ class EmbeddingRocksDB : public kv_db::EmbeddingKVDB { friend class CheckpointHandle; std::vector> dbs_; + std::vector metadata_cf_handles_; std::vector> initializers_; std::unique_ptr executor_; rocksdb::ReadOptions ro_{}; rocksdb::WriteOptions wo_{}; std::shared_ptr rate_limiter_; + rocksdb::ColumnFamilyOptions cf_options_; std::vector shard_flush_compaction_deadlines_; bool done_staggered_flushes_; int64_t memtable_flush_offset_;