From 9c2ebcc2c365bb89af566b3076f813d7bf11146b Mon Sep 17 00:00:00 2001 From: Yu Zhang Date: Tue, 8 Aug 2023 12:25:21 -0700 Subject: [PATCH] Log user_defined_timestamps_persisted flag in event logger (#11683) Summary: As titled, and also removed an undefined and unused member function in for ColumnFamilyData Pull Request resolved: https://github.com/facebook/rocksdb/pull/11683 Reviewed By: ajkr Differential Revision: D48156290 Pulled By: jowlyzhang fbshipit-source-id: cc99aaafe69db6611af3854cb2b2ebc5044941f7 --- db/column_family.h | 2 -- db/event_helpers.cc | 2 ++ db_stress_tool/db_stress_test_base.cc | 1 - table/table_properties.cc | 4 ++++ 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/db/column_family.h b/db/column_family.h index f976c24cc1..3f3466e8ea 100644 --- a/db/column_family.h +++ b/db/column_family.h @@ -519,8 +519,6 @@ class ColumnFamilyData { return file_metadata_cache_res_mgr_; } - SequenceNumber GetFirstMemtableSequenceNumber() const; - static const uint32_t kDummyColumnFamilyDataId; // Keep track of whether the mempurge feature was ever used. diff --git a/db/event_helpers.cc b/db/event_helpers.cc index 4360144ece..d442a1ed7b 100644 --- a/db/event_helpers.cc +++ b/db/event_helpers.cc @@ -122,6 +122,8 @@ void EventHelpers::LogAndNotifyTableFileCreationFinished( << "column_family_name" << table_properties.column_family_name << "column_family_id" << table_properties.column_family_id << "comparator" << table_properties.comparator_name + << "user_defined_timestamps_persisted" + << table_properties.user_defined_timestamps_persisted << "merge_operator" << table_properties.merge_operator_name << "prefix_extractor_name" << table_properties.prefix_extractor_name << "property_collectors" diff --git a/db_stress_tool/db_stress_test_base.cc b/db_stress_tool/db_stress_test_base.cc index b0fd6ce7d9..fce0e0f6ac 100644 --- a/db_stress_tool/db_stress_test_base.cc +++ b/db_stress_tool/db_stress_test_base.cc @@ -491,7 +491,6 @@ void StressTest::PreloadDbAndReopenAsReadOnly(int64_t number_of_keys, const Slice v(value, sz); - std::string ts; if (FLAGS_user_timestamp_size > 0) { ts = GetNowNanos(); diff --git a/table/table_properties.cc b/table/table_properties.cc index 06ea13f7c8..17a13543de 100644 --- a/table/table_properties.cc +++ b/table/table_properties.cc @@ -109,6 +109,10 @@ std::string TableProperties::ToString(const std::string& prop_delim, AppendProperty(result, "comparator name", comparator_name.empty() ? std::string("N/A") : comparator_name, prop_delim, kv_delim); + AppendProperty(result, "user defined timestamps persisted", + user_defined_timestamps_persisted ? std::string("true") + : std::string("false"), + prop_delim, kv_delim); AppendProperty( result, "merge operator name",